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

Wysłany: 2017-07-29, 12:40


Maksasior

B)






Wiek: 24
Na forum: 3581 dni
Posty: 47
Nick w MP: tomals0n

Piwa: 34

Respekt: 101
Respekt: 101

Cze?? pobra?em sobie kilka prac z IYW. Nie dzia?aj? zarobki, pr?bowa?em givePlayerMoney(thePlayer, hajsik) local hajsik = math.random(64,74)
Oraz triggerServerEvent("givePlayerMoney", localPlayer, hajsik)
outputChatBox("Otrzymujesz "..hajsik.." blablablabla")
To i to nie dzia?a, prosz? o szybk? pomoc. (( Piweczko oraz Respekt za pomoc ;) ))

Podpis
--Szatan:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-29, 12:43


STOPseba

Emeryt na scenie MTA






Wiek: 25
Na forum: 3771 dni
Posty: 448
Nick w MP: STOPseba

Piwa: 5014

Respekt: 576,3
Respekt: 576,3

jak pobra?e? prace z IYW to pobierz te? ogrpg-core a potem uruchom i b?dzie dzia?a? :)

Podpis



Kontakt
Discord: STOPseba#7603
STOPseba na fejsie
Messenger


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-29, 13:09


Dani3l_105







Wiek: 26
Na forum: 3754 dni
Posty: 21
Nick w MP: Dziki



Respekt: 45,3

Polecam w??czy? skrypt ogrpg-prace-setting

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-29, 13:26


Maksasior

B)






Wiek: 24
Na forum: 3581 dni
Posty: 47
Nick w MP: tomals0n

Piwa: 34

Respekt: 101
Respekt: 101

STOPseba, Dani3l_105, W??czy?em to i to, nadal nie dzia?a.

[ Dodano: 2017-07-29, 14:30 ]
Potrzebuje pilnej pomocy. :x

Podpis
--Szatan:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-29, 14:32


AteX







Wiek: 26
Na forum: 4015 dni
Posty: 927
Nick w MP: #AteX

Piwa: 8360

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

triggerServerEvent("givePlayerMoney"localPlayerhajsik)

Utw?rz funkcj? po stronie serwera, kt?ra b?dzie odpowiada? na ten trigger.

Podpis
MultiTheftAuto++ dla MTA 1.5.7 już dostępne.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-29, 14:37


Maksasior

B)






Wiek: 24
Na forum: 3581 dni
Posty: 47
Nick w MP: tomals0n

Piwa: 34

Respekt: 101
Respekt: 101

AteX, Nadal nic :shock:

Podpis
--Szatan:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-29, 15:47


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Maksasior, poka? tw?j kod, ja proponowa?bym zrobienie tiggera kt?ry kieruje z client side do server side

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-07-29, 16:17


Maksasior

B)






Wiek: 24
Na forum: 3581 dni
Posty: 47
Nick w MP: tomals0n

Piwa: 34

Respekt: 101
Respekt: 101

Kod:


local jobTarget
local jobMarker
local jobVehicle
local maxTarget = #districtsBus
function odleglosc()
local x,y,z = getElementPosition(localPlayer)
local mx,my,mz = getElementPosition(jobMarker)
local distance = getDistanceBetweenPoints3D(x,y,z,mx,my,mz)
if distance > 600 then
outputChatBox("Odjecha?e? zadaleko punktu.")
finishJob()
end
end
function finishJob()
if jobMarker and isElement(jobMarker) then
destroyElement(jobMarker)
jobMarker = nil
end
if jobBlip and isElement(jobBlip) then
destroyElement(jobBlip)
jobBlip = nil
end
if jobTarget and isElement(jobTarget) then
destroyElement(jobTarget)
jobTarget = nil
jobTarget = 0

end
if getElementData(localPlayer,"player:job") == code then
setElementData(localPlayer,"player:job",false)
end
triggerServerEvent("destroyVeh", localPlayer)
removeEventHandler("onClientRender",root,odleglosc)
end
addEventHandler ( "onClientPlayerWasted", getLocalPlayer(),finishJob)
addEvent("finishJob",true)
addEventHandler("finishJob",root,function(plr)
if plr ~= localPlayer then return end
finishJob()
end)


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()
playSoundFrontEnd(5)
outputChatBox("* Zako?czy?e?/a? prac?.")
else
local kasa = math.random(64,74)
showMarker()
playSoundFrontEnd(12)
triggerServerEvent("givePlayerMoney", localPlayer, kasa)

outputChatBox("Otrzymujesz "..kasa.." PLN za zidentyfikowanie punktu.")
end
end

function showMarker()
if jobMarker and isElement(jobMarker) then
destroyElement(jobMarker)
jobMarker = nil
end
if jobBlip and isElement(jobBlip) then
destroyElement(jobBlip)
jobBlip = nil
end


jobTarget = jobTarget + 1
jobMarker = createMarker(districtsBus[jobTarget][1], districtsBus[jobTarget][2], districtsBus[jobTarget][3], "checkpoint", 4, 0, 0, 255)
jobBlip = createBlip(districtsBus[jobTarget][1], districtsBus[jobTarget][2], districtsBus[jobTarget][3], 41)
if districtsBus[jobTarget+1] then
ile = districtsBus[jobTarget+1]
ile2 = ile[1]
ile3 = ile[2]
ile4 = ile[3]
setMarkerTarget(jobMarker, ile[1], ile[2], ile[3])
end

addEventHandler("onClientMarkerHit", jobMarker, busDriver)
end

addEvent("STARTJobBus", true)
addEventHandler("STARTJobBus", resourceRoot, function(veh)
outputChatBox("* Rozpocze?e?/a? prace.")
jobVehicle = veh
jobTarget = 0
showMarker()
addEventHandler("onClientRender",root,odleglosc)
end)

addEventHandler("onClientResourceStop", resourceRoot, function()
if jobVehicle and getElementData(localPlayer, "player:job") then
setElementData(localPlayer, "player:job", false)
end
end)


addEventHandler("onClientVehicleExit", resourceRoot, function(plr, seat)
if seat == 0 then
if plr == localPlayer then
finishJob()
outputChatBox("Zako?czy?e? prac?")
end
end
end)


[ Dodano: 2017-07-30, 11:28 ]
ref

Podpis
--Szatan:
Postaw piwo autorowi tego posta
 

 
Tagi: nie :: otrzymuje :: pieniędzy :: prac.
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA 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