guciopl5
Wiek: 23 Na forum: 3146 dni Posty: 86
Nick w MP: Whit3
Piwa : 8
ot?? robie co? takiego czyli prace poprzez marker przerabiam to z ma?ego gamemoda i nwm co jest nie tak .. wszystko sie pokazuje lecz gdy wpisuje /job i wybieram 1 to nic sie nie dzieje .. pomo?e kto?
function onJoin1 ()
local Jobber1 = getPlayerAccount ( source )
if ( Jobber1 ) then
local leveltrucker = getAccountData ( Jobber1 , "keks.truckerlevel" )
if getAccountData ( Jobber1 , "keks.job" ) == 0 then
outputChatBox ( "You have no job! Take a job and earn money!" , source , 255 , 255 , 0 )
elseif getAccountData ( Jobber1 , "keks.job" ) == 1 then
outputChatBox ( "You are a trucker! Use /jobhelp for more information" , source , 255 , 255 , 0 )
outputChatBox ( "Dein Level: " .. leveltrucker .. "!" , source , 255 , 255 , 0 )
elseif getAccountData ( Jobber1 , "keks.job" ) == 3 then
outputChatBox ( "You are a Pilot! Use /jobhelp for more information" , source , 255 , 255 , 0 )
end
end
end
addEventHandler ( "onPlayerLogin" , getRootElement (), onJoin1 )
pickup = createPickup ( - 153.37437438965 , 1077.337890625 , 19.7421875 , 3 , 1274 , 100 )
jobmarker = createMarker (- 153.37437438965 , 1077.337890625 , 19.7421875 , "cylinder" , 0.89999997615814 , 255 , 255 , 255 , 0 )
function openjob ( thePlayer )
outputChatBox ( " Urzyj komendy /praca 1 aby rozpocz?? prace " , thePlayer , 255 , 255 , 0 )
outputChatBox ( "/praca 1 (1= kierowca tira, )" , thePlayer , 255 , 0 , 0 )
end
addEventHandler ( "onMarkerHit" , jobmarker , openjob )
function commandjob ( thePlayer , cmd , jobid )
local Spieler = getPlayerAccount ( thePlayer )
if ( Spieler ) then
if isElementWithinMarker ( thePlayer , jobmarker ) then
if jobid == "1" then
outputChatBox ( "Teraz zosta?e? kierowc? ci??ar?wki! .. Gratulacje podje?e?/a? prace udaj si? do znaczku tira na minimapce aby rozpocz?? prace" , thePlayer )
setAccountData ( Spieler , "keks.job" , 1 )
outputChatBox ( "u?yj / jobhelp, aby uzyska? pomoc" , thePlayer )
end
end
end
addCommandHandler ( "job" , commandjob )
function offjob ( thePlayer )
local Spieler = getPlayerAccount ( thePlayer )
if ( Spieler ) then
outputChatBox ( "You are workless!" , thePlayer )
setAccountData ( Spieler , "keks.job" , 0 )
end
end
addCommandHandler ( "joboff" , offjob )
function jobhelp ( thePlayer )
local Jobplayer = getPlayerAccount ( thePlayer )
if ( Jobplayer ) then
if getAccountData ( Jobplayer , "keks.job" ) == 1 or getAccountData ( Jobplayer , "keks.job" ) == 2 or getAccountData ( Jobplayer , "keks.job" ) == 3 then
outputChatBox ( "U?yj / jobstats, aby podnie?? poziom swojej pracy!" , thePlayer , 255 , 255 , 0 )
else
outputChatBox ( "Nie mia?e? pracy!" , thePlayer , 255 , 0 , 0 )
end
end
end
addCommandHandler ( "jobhelp" , jobhelp )
function jobstats ( thePlayer )
local Jobplayer = getPlayerAccount ( thePlayer )
if ( Jobplayer ) then
if getAccountData ( Jobplayer , "keks.job" ) == 1 then
local truckerlevel = getAccountData ( Jobplayer , "keks.trucklevel" )
outputChatBox ( "Your level: " .. truckerlevel .. "" , thePlayer , 255 , 255 , 0 )
else
outputChatBox ( "Nie mia?e? pracy" , thePlayer , 255 , 0 , 0 )
end
end
end
addCommandHandler ( "jobstats" , jobstats )
end
Ostatnio zmieniony przez Atroth 2018-06-19, 17:52, w całości zmieniany 1 raz