Wysłany: 2014-01-20, 12:29
Zgredek666
LUA
Wiek: 27 Na forum: 4722 dni Posty: 251
Nick w MP: Zgredek
Piwa : 442
Witam ! Mam problem z logowaniem do frakcji. Bl?d mam w 4 i 5 linijce (nie ogarnia palyerName)
Sever:
local poli = createTeam ( "Policja" , 0 , 0 , 255 )
function poli1 ( thePlayer )
local playerName = getAccountName ( getPlayerAccount ( thePlayer ))
if isObjectInACLGroup ( "user." .. playerName .. aclGetGroup ( "Policja" )) then
setPlayerTeam ( thePlayer , poli )
giveWeapon ( thePlayer , 31 , 10000 )
giveWeapon ( thePlayer , 23 , 10000 )
giveWeapon ( thePlayer , 29 , 10000 )
setPedArmor ( thePlayer , 100 )
setElementModel ( thePlayer , 281 )
setElementPosition ( thePlayer , - 1615.56445312 , 681.64276123047 , 7.1875 )
setPlayerNametagColor ( thePlayer , 0 , 0 , 255 )
else
outputChatBox ( "Nie jestes pracownikiem Policji." , getRootElement ())
end
end
addEvent ( "zmienEvent" , true )
addEventHandler ( "zmienEvent" , getRootElement (), poli1 )
Client:
GUIEditor_Window = {}
GUIEditor_Button = {}
GUIEditor_Image = {}
local panel = guiCreateWindow ( 277 , 116 , 393 , 413 , "Panel Logowania do Frakcji/Firmy" , false )
local policja = guiCreateButton ( 9 , 29 , 180 , 58 , "Policja" , false , panel )
local pogotowie = guiCreateButton ( 9 , 100 , 180 , 58 , "Pogotowie" , false , panel )
local pd = guiCreateButton ( 9 , 177 , 180 , 58 , "Pomoc Drogowa" , false , panel )
local taxi = guiCreateButton ( 9 , 261 , 180 , 58 , "Taxi" , false , panel )
local tvp = guiCreateButton ( 9 , 344 , 180 , 58 , "TVP" , false , panel )
local rt = guiCreateButton ( 205 , 31 , 180 , 58 , "Rol Trans" , false , panel )
local petrolpol = guiCreateButton ( 205 , 101 , 180 , 58 , "PetrolPol" , false , panel )
local tescotrans = guiCreateButton ( 205 , 178 , 180 , 58 , "Tesco Trans" , false , panel )
local zdjecie = guiCreateStaticImage ( 197 , 260 , 186 , 137 , "nazwa1.png" , false , panel )
showCursor ( true )
addEventHandler ( "onClientResourceStart" , getRootElement ( ),
function ( startedRes )
guiSetVisible ( panel , true )
guiSetVisible ( zdjecie , true )
end
)
function zmien ()
triggerServerEvent ( "zmienEvent" , getRootElement (), "" )
end
addEventHandler ( "onClientGUIClick" , policja , zmien )
Bardzo prosz? o pomoc, daj? zimne
Wysłany: 2014-01-20, 12:36
KukiX
Wiek: 34 Na forum: 6718 dni Posty: 567
Piwa : 17560
Sever:
local poli = createTeam ( "Policja" , 0 , 0 , 255 )
function poli1 ()
local playerName = getAccountName ( getPlayerAccount ( source ))
if isObjectInACLGroup ( "user." .. playerName .. aclGetGroup ( "Policja" )) then
setPlayerTeam ( source , poli )
giveWeapon ( source , 31 , 10000 )
giveWeapon ( source , 23 , 10000 )
giveWeapon ( source , 29 , 10000 )
setPedArmor ( source , 100 )
setElementModel ( source , 281 )
setElementPosition ( source , - 1615.56445312 , 681.64276123047 , 7.1875 )
setPlayerNametagColor ( source , 0 , 0 , 255 )
else
outputChatBox ( "Nie jestes pracownikiem Policji." , source )
end
end
addEvent ( "zmienEvent" , true )
addEventHandler ( "zmienEvent" , getRootElement (), poli1 )
Client:
GUIEditor_Window = {}
GUIEditor_Button = {}
GUIEditor_Image = {}
local panel = guiCreateWindow ( 277 , 116 , 393 , 413 , "Panel Logowania do Frakcji/Firmy" , false )
local policja = guiCreateButton ( 9 , 29 , 180 , 58 , "Policja" , false , panel )
local pogotowie = guiCreateButton ( 9 , 100 , 180 , 58 , "Pogotowie" , false , panel )
local pd = guiCreateButton ( 9 , 177 , 180 , 58 , "Pomoc Drogowa" , false , panel )
local taxi = guiCreateButton ( 9 , 261 , 180 , 58 , "Taxi" , false , panel )
local tvp = guiCreateButton ( 9 , 344 , 180 , 58 , "TVP" , false , panel )
local rt = guiCreateButton ( 205 , 31 , 180 , 58 , "Rol Trans" , false , panel )
local petrolpol = guiCreateButton ( 205 , 101 , 180 , 58 , "PetrolPol" , false , panel )
local tescotrans = guiCreateButton ( 205 , 178 , 180 , 58 , "Tesco Trans" , false , panel )
local zdjecie = guiCreateStaticImage ( 197 , 260 , 186 , 137 , "nazwa1.png" , false , panel )
showCursor ( true )
addEventHandler ( "onClientResourceStart" , getRootElement ( ),
function ( startedRes )
guiSetVisible ( panel , true )
guiSetVisible ( zdjecie , true )
end
)
function zmien ()
triggerServerEvent ( "zmienEvent" , getLocalPlayer () )
end
addEventHandler ( "onClientGUIClick" , policja , zmien )
Wysłany: 2014-01-20, 12:54
Zgredek666
LUA
Wiek: 27 Na forum: 4722 dni Posty: 251
Nick w MP: Zgredek
Piwa : 442
Odwo?uje si? w 5 linijce w serwerze do "userdata"
@update Problem rozwi?za?em
Teraz mam taki problem ?e panel w??cza mi si? jednocze?nie z panelem logowania.
zrobi?em takie co? function open ()
guiSetVisible ( panel , true )
guiSetVisible ( zdjecie , true )
end
addEventHandler ( "onClientPlayerSpawn" , getLocalPlayer (), open )
ale dalej nic
Prosz? o pomoc daj? zimne
Tagi: logowanie :: frakcji
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: