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

Wysłany: 2020-06-13, 22:32


AmLotte.







Wiek: 21
Na forum: 2184 dni
Posty: 134
Nick w MP: AmLotte

Piwa: 443

Respekt: 50

Chodzi mi o np. taki przyk?ad. Nie rozumiem tego...


Kod:

function busDriver(el, md)
if el ~= localPlayer or not md then return end
if jobTarget > maxTarget and getPedOccupiedVehicle(el) then return end
if jobTarget == maxTarget and not getPedOccupiedVehicle(el) then return end

if jobTarget == #districtsBus then
finishJob()
destroyElement(blip)
destroyElement(jobMarker)
playSoundFrontEnd(5)
setElementData(el,"gracz:praca",false)
else
local veh = getPedOccupiedVehicle(el)
showMarker()
setTimer(function()
playSoundFrontEnd(12)
rp = math.random(1,3)
kasa = math.random(20000,20000)
if getElementData(localPlayer,"player:premium") then
currentMoney = getElementData(el, "player:money") or 0
setElementData(el, "player:money", currentMoney+kasa)
setElementData(el,"player:srp", getElementData(el,"player:srp")+rp)
triggerEvent('onClientAddNotification', localPlayer, 'Za dojechanie na przystanek otrzymujesz,\nwynagrodzenie: #00c005'..kasa..' $#FFFFFF oraz #00c005'..rp..' REP', 'success')
end
end,4800,1)
end
end



To jest jaka? zmienna kt?rej si? u?ywa do losowych punkt?w czy co?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-06-13, 22:59


Wilq







Wiek: 24
Na forum: 4429 dni
Posty: 3410

Piwa: 739

Respekt: 1225,8
Respekt: 1225,8

Ale jaki target? Wska? linijk?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2020-06-14, 13:19


PatryKK.

Emeryt LUA






Wiek: 26
Na forum: 3061 dni
Posty: 1060
Nick w MP: PatryKK.

Piwa: 2322

Respekt: 331,5
Respekt: 331,5Respekt: 331,5Respekt: 331,5

if jobTarget maxTarget and

O to Ci chodzi?

Postaw piwo autorowi tego posta
 

 
Tagi: oznacza :: target?
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Co oznacza Target? Odpowiedz do tematu

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