BlackTen
LUA Dev.
Wiek: 28 Na forum: 4329 dni Posty: 698
Piwa : 2080
witam mam kod
i nic nie dziala
c-side
GUIEditor = {
tab = {},
tabpanel = {},
label = {},
button = {},
window = {}
}
addEventHandler ( "onClientResourceStart" , resourceRoot ,
function()
GUIEditor . window [ 1 ] = guiCreateWindow ( 136 , 273 , 1650 , 629 , "Wybierz team" , false )
guiWindowSetSizable ( GUIEditor . window [ 1 ], false )
guiSetProperty ( GUIEditor . window [ 1 ], "CaptionColour" , "FF0750F7" )
showCursor ( true , GUIEditor . window [ 1 ])
GUIEditor . button [ 1 ] = guiCreateButton ( 15 , 31 , 491 , 579 , "S.W.A.T" , false , GUIEditor . window [ 1 ])
guiSetFont ( GUIEditor . button [ 1 ], "sa-gothic" )
guiSetProperty ( GUIEditor . button [ 1 ], "NormalTextColour" , "FF0226FB" )
function dajz ()
triggerServerEvent ( "swat" , root )
end
addEventHandler ( "onClientGUIClick" , GUIEditor . button [ 1 ], dajz )
GUIEditor . button [ 2 ] = guiCreateButton ( 1145 , 31 , 491 , 579 , "Wojsko" , false , GUIEditor . window [ 1 ])
guiSetFont ( GUIEditor . button [ 2 ], "sa-gothic" )
guiSetProperty ( GUIEditor . button [ 2 ], "NormalTextColour" , "FF604939" )
GUIEditor . tabpanel [ 1 ] = guiCreateTabPanel ( 525 , 39 , 576 , 198 , false , GUIEditor . window [ 1 ])
function dajo ()
triggerServerEvent ( "wojsko" , root )
end
addEventHandler ( "onClientGUIClick" , GUIEditor . button [ 2 ], dajo )
GUIEditor . tabpanel [ 1 ] = guiCreateTabPanel ( 525 , 39 , 576 , 198 , false , GUIEditor . window [ 1 ])
GUIEditor . tab [ 1 ] = guiCreateTab ( "S.W.A.T" , GUIEditor . tabpanel [ 1 ])
GUIEditor . label [ 1 ] = guiCreateLabel ( 9 , 11 , 525 , 132 , "S.W.A.T:Bronie : M4,MP5,Deagle" , false , GUIEditor . tab [ 1 ])
guiSetFont ( GUIEditor . label [ 1 ], "sa-header" )
guiLabelSetColor ( GUIEditor . label [ 1 ], 67 , 60 , 228 )
guiLabelSetHorizontalAlign ( GUIEditor . label [ 1 ], "left" , true )
GUIEditor . tab [ 2 ] = guiCreateTab ( "Wojsko" , GUIEditor . tabpanel [ 1 ])
GUIEditor . label [ 2 ] = guiCreateLabel ( 4 , 6 , 555 , 150 , "Wojsko:Bronie : M4,MP5,Deagle" , false , GUIEditor . tab [ 2 ])
guiSetFont ( GUIEditor . label [ 2 ], "sa-header" )
guiLabelSetColor ( GUIEditor . label [ 2 ], 100 , 109 , 43 )
guiLabelSetHorizontalAlign ( GUIEditor . label [ 2 ], "left" , true )
GUIEditor . tab [ 3 ] = guiCreateTab ( "Skiny" , GUIEditor . tabpanel [ 1 ])
GUIEditor . label [ 3 ] = guiCreateLabel ( 3 , 2 , 503 , 162 , "S.W.A.T : 285 Wojsko : 287" , false , GUIEditor . tab [ 3 ])
guiSetFont ( GUIEditor . label [ 3 ], "sa-header" )
guiLabelSetColor ( GUIEditor . label [ 3 ], 53 , 98 , 91 )
guiLabelSetHorizontalAlign ( GUIEditor . label [ 3 ], "left" , true )
end
)
s-side
function teama ()
setPlayerTeam ( source , SWAT )
setPedSkin ( source , 285 )
giveWeapon ( thePlayer , 31 , 5000 )
giveWeapon ( thePlayer , 24 , 5000 )
giveWeapon ( thePlayer , 29 , 5000 )
spawnPlayer ( thePlayer , - 1351.080078125 , 490.55859375 , 18.227842330933 )
end
addEvent ( "swat" , true )
addEventHandler ( "swat" , root , teama )
function teamb ()
setPlayerTeam ( source , Wojsko )
setPedSkin ( source , 287 )
giveWeapon ( thePlayer , 31 , 5000 )
giveWeapon ( thePlayer , 24 , 5000 )
giveWeapon ( thePlayer , 29 , 5000 )
spawnPlayer ( thePlayer , - 1283.8621826172 , 2513.2102050781 , 87.040603627695 )
end
addEvent ( "wojsko" , true )
addEventHandler ( "wojsko" , root , teamb )
meta:
< meta >
< script type = "server" src = "s-side.lua" />
< script type = "client" src = "c-side.lua" />
</ meta >
[ Dodano : 2014-09-20, 21:36 ]
w sesie kursor myszki i jak nie dolacza do team?w