Wysłany: 2014-05-18, 23:46
Rebeka
Szefostwo
Wiek: 31 Na forum: 4451 dni Posty: 37
Nick w MP: Projekt
Piwa : 15
[b]Dlaczego jak kto? wchodzi w Gui to widzi je ka?dy kto jest na servie?
Jest po stronie Client
Dlaczego jak wchodzi kto ? w Gui to widzi je ka ? dy ? one jest zrobione po stronie clienta :/[/ b ]
[ lua : 2 ] GUIEditor_Label = {}
transWindow = guiCreateWindow ( 182 , 134 , 482 , 342 , "ROLNIK" , false )
guiSetVisible ( transWindow , false )
destiLabel = guiCreateLabel ( 19 , 20 , 450 , 55 , "Zadanie jest proste, dostaniesz kombajn i jezdzij po polu" , false , transWindow )
destiLabel = guiCreateLabel ( 19 , 33 , 450 , 55 , "Za jeden punkt dostajesz 1$. Czy akceptujesz? " , false , transWindow )
lvButtonRadio = guiCreateRadioButton ( 20 , 199 , 437 , 19 , "AKCEPTUJE" , false , transWindow )
acceptButton = guiCreateButton ( 103 , 267 , 113 , 37 , "Biore" , false , transWindow )
closeButton = guiCreateButton ( 241 , 266 , 108 , 37 , "Anuluj" , false , transWindow )
local jobmarker = createMarker ( - 366.57986 ,- 1419.91809 , 24.72656 , "cylinder" , 1 , 255 , 0 , 0 , 255 )
createBlipAttachedTo ( jobmarker , 40 )
function MarkerHit ( hitPlayer , matchingDimension )
guiSetVisible ( transWindow , true )
showCursor ( true )
end
addEventHandler ( "onClientMarkerHit" , jobmarker , MarkerHit )
function closeChangeJobWindow ()
if ( source == closeButton ) then
guiSetVisible ( transWindow , false )
showCursor ( false )
end
end
addEventHandler ( "onClientGUIClick" , getResourceRootElement ( getThisResource ()), closeChangeJobWindow )
function lvjobcli ()
if ( source == acceptButton ) then
if ( guiRadioButtonGetSelected ( lvButtonRadio )) then
triggerServerEvent ( "givePlayerJobLV" , getLocalPlayer ())
guiSetVisible ( transWindow , false )
showCursor ( false )
end
end
end
addEventHandler ( "onClientGUIClick" , acceptButton , lvjobcli , false )
--------------
function rendere ()
local scX , scY = guiGetScreenSize ()
local px , py = getScreenFromWorldPosition ( - 366.57297 , - 1417.64746 , 24.92656 + 1.5 , 0.06 )
local cx , cy , cz = getCameraMatrix ()
local dist = getDistanceBetweenPoints3D ( cx , cy , cz ,- 366.57297 , - 1417.64746 , 24.92656 );
if dist >= 1 and dist <= 35 then
if px then
dxDrawText ( "ROLNIK" , px , py + scY / 38 , px , py , tocolor ( 99 , 99 , 99 , 255 ), 2 , 'default-bold' , 'center' , 'center' , false , false )
end
end
end
addEventHandler ( 'onClientRender' , getRootElement (), rendere )
--[[
scX , scY = guiGetScreenSize ()
local l_w
end
end
end
addEventHandler ( 'onClientRender' , getRootElement (), rendere2 )
]]--
[/ lua : 2 ]
Wysłany: 2014-05-19, 08:28
monio
Wiek: 30 Na forum: 4887 dni Posty: 319
Nick w MP: Monio99
Piwa : 3565
transWindow = guiCreateWindow ( 182 , 134 , 482 , 342 , "ROLNIK" , false )
guiSetVisible ( transWindow , false )
destiLabel = guiCreateLabel ( 19 , 20 , 450 , 55 , "Zadanie jest proste, dostaniesz kombajn i jezdzij po polu" , false , transWindow )
destiLabel = guiCreateLabel ( 19 , 33 , 450 , 55 , "Za jeden punkt dostajesz 1$. Czy akceptujesz? " , false , transWindow )
lvButtonRadio = guiCreateRadioButton ( 20 , 199 , 437 , 19 , "AKCEPTUJE" , false , transWindow )
acceptButton = guiCreateButton ( 103 , 267 , 113 , 37 , "Biore" , false , transWindow )
closeButton = guiCreateButton ( 241 , 266 , 108 , 37 , "Anuluj" , false , transWindow )
guiSetVisible ( transWindow , false ) ---- tylko to :)
Tagi: stronie :: clienta
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: