Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2018-06-19, 16:31


guciopl5







Wiek: 23
Na forum: 3287 dni
Posty: 86
Nick w MP: Whit3

Piwa: 8

Respekt: 45,3

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


Komentarz Atroth dodany 2018-06-19, 17:51Stosuj znaczniki [lua][/lua].
Ostatnio zmieniony przez Atroth 2018-06-19, 17:52, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-06-19, 18:02


CjPomarancza

:-)






Wiek: 17
Na forum: 3324 dni
Posty: 90

Piwa: 12

Respekt: 60

co? pojawia si? w db3?

Podpis
Pomogłem? Doceń mnie i postaw :piwo: :)
Postaw piwo autorowi tego posta
 

 
Tagi: praca
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » praca Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku