Wysłany: 2014-01-28, 15:15
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
Witam robi? panel rejestacji aut i mam problem. jak zarejestuje to chce jak gracz b?dzi? pr?bowa? do auta wejsc to ?eby spawdza?o najpierw czy auto jest zarejestowane i kogo oto kod:
function WejscieDoauta ( thePlayer , seat , jacked )
local kontogracza = getAccountName ( getPlayerAccount ( thePlayer ))
local auto_gracza = getPedOccupiedVehicle ( thePlayer )
if getElementData ( auto_gracza , "rejestracja" ) then
removePedFromVehicle ( thePlayer )
else
if getElementData ( auto_gracza , "wlaciciel_auta" ) == auto_gracza then
outputChatBox ( "To nie twoje auto!" , thePlayer , 193 , 13 , 13 )
else
outputChatBox ( "Witamy w swoim autcie!" , thePlayer , 193 , 13 , 13 )
end
end
end
addEventHandler ( "onVehicleExit" , getRootElement (), WejscieDoauta )
Wysłany: 2014-01-28, 15:40
McDeKi
Wiek: 28 Na forum: 4844 dni Posty: 95
Nick w MP: McDeKi
Piwa : 186
function WejscieDoauta ( thePlayer , seat , jacked , door )
local kontogracza = getAccountName ( getPlayerAccount ( thePlayer ))
local auto_gracza = getPedOccupiedVehicle ( thePlayer )
if getElementData ( auto_gracza , "rejestracja" ) then
cancelEvent ()
else
if getElementData ( auto_gracza , "wlaciciel_auta" ) == auto_gracza then
outputChatBox ( "To nie twoje auto!" , thePlayer , 193 , 13 , 13 )
cancelEvent ()
else
outputChatBox ( "Witamy w swoim autcie!" , thePlayer , 193 , 13 , 13 )
end
end
end
addEventHandler ( "onVehicleStartEnter" , getRootElement (), WejscieDoauta )
Tagi: wlaciciel :: auta
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: