Wysłany: 2018-10-19, 23:23
AkossPL
Wiek: 25 Na forum: 4079 dni Posty: 140
Nick w MP: AkossPL
Piwa : 3
Siema tak jak w temacie postawie piwo
function displayNextCP ( el , md )
if el ~= localPlayer or not md then return end
if not getPedOccupiedVehicle ( el ) then return end
if jobTarget < #jobPoints then
jobTarget = 1
showMarker ()
jobTarget = jobTarget + 1
showMarker ()
jobTarget = 1
showMarker ()
if getElementData ( localPlayer , "player:premiumpp" ) then -- z premk ?
zarobek = math . random ( 2500000 , 3000000 ) -- hajs ustal sam
exports . noti : showBox ( "error" , "Za piel?gnacje ro?lin otrzymujesz " .. zarobek .. " PLN" )
triggerServerEvent ( "givePlayerMoney" , localPlayer , zarobek , 0 )
else
zarobek = math . random ( 2000000 , 2500000 ) -- bez premki hajs ustal sam
exports . noti : showBox ( "error" , "Za piel?gnacje ro?lin otrzymujesz " .. zarobek .. " PLN" )
triggerServerEvent ( "givePlayerMoney" , localPlayer , zarobek , 0 )
end
end
Wysłany: 2018-10-20, 00:05
Dawcio77
Wiek: 22 Na forum: 3312 dni Posty: 89
Nick w MP: cx_u
Piwa : 136
Za ma?o kodu. Rozwi? troche co chcesz.
Wysłany: 2018-10-20, 01:05
AkossPL
Wiek: 25 Na forum: 4079 dni Posty: 140
Nick w MP: AkossPL
Piwa : 3
Dawcio77 , -- Settings
local jobBlip
local jobTarget
local jobMarker
local jobVehicle
local jobWeave ={ 80000 , 0 }
local jobWeaveP ={ 120000 , 0 }
local jobPoints ={
{ 965.33 ,- 1010.29 , 33.46 , 0 , 0 , 0 },
{ 1117.58 ,- 958.15 , 42.09 , 0 , 0 , 0 },
{ 1193.10 ,- 661.63 , 60.38 , 0 , 0 , 0 },
{ 1222.95 ,- 249.19 , 23.50 , 0 , 0 , 0 },
{ 1280.24 ,- 100.68 , 36.82 , 0 , 0 , 0 },
{ 1288.48 , 162.54 , 19.99 , 0 , 0 , 0 },
{ 1350.24 , 354.27 , 19.48 , 0 , 0 , 0 },
{ 1699.49 , 380.41 , 19.30 , 0 , 0 , 0 },
{ 2186.84 , 229.33 , 14.07 , 0 , 0 , 0 },
{ 2341.04 , 154.68 , 25.85 , 0 , 0 , 0 },
{ 2260.70 , 95.27 , 25.89 , 0 , 0 , 0 },
{ 2219.59 , 67.83 , 25.88 , 0 , 0 , 0 },
{ 2281.10 ,- 47.78 , 26.53 , 0 , 0 , 0 },
{ 1932.45 , 43.92 , 33.33 , 0 , 0 , 0 },
{ 1201.99 ,- 217.18 , 33.13 , 0 , 0 , 0 },
{ 1197.27 ,- 643.68 , 58.76 , 0 , 0 , 0 },
{ 993.54 ,- 1038.27 , 30.10 , 0 , 0 , 0 },
{ 1000.46 ,- 1105.15 , 23.35 , 0 , 0 , 0 },
}
-- Functions
local function finishJob ( value )
if jobMarker and isElement ( jobMarker ) then
destroyElement ( jobMarker )
jobMarker = nil
end
if jobBlip and isElement ( jobBlip ) then
destroyElement ( jobBlip )
jobBlip = nil
end
if value then
jobVehicle = nil
setElementData ( localPlayer , "player:job" , false )
end
end
addEventHandler ( "onClientMarkerHit" , resourceRoot , function( el , dim )
if el ~= localPlayer or not dim or getElementType ( el ) ~= "player" or getPedOccupiedVehicle ( el ) then return end
if getElementData ( el , "player:license:pjC" ) ~= 1 then
exports . noti : showBox ( "warning" , "Aby tu pracowa? potrzebujesz prawo jazdy kategorii C." )
return
end
end )
setTimer (function()
if jobVehicle and isElement ( jobVehicle ) and getPedOccupiedVehicle ( localPlayer ) ~= jobVehicle then
triggerServerEvent ( "cancelJob" , resourceRoot , jobVehicle )
finishJob ( true )
end
end , 10000 , 0 )
function displayNextCP ( el , md )
if el ~= localPlayer or not md then return end
if not getPedOccupiedVehicle ( el ) then return end
if jobTarget < #jobPoints then
jobTarget = jobTarget + 1
showMarker ()
if not getElementData ( localPlayer , "player:premiumpp" ) then -- z premk ?
exports . noti : showBox ( "error" , "Za piel?gnacje ro?lin otrzymujesz 100000 PLN" )
triggerServerEvent ( "givePlayerMoney" , el , jobWeaveP [ 1 ], jobWeaveP [ 2 ])
else
exports . noti : showBox ( "error" , "Za piel?gnacje ro?lin otrzymujesz 100000 PLN" )
triggerServerEvent ( "givePlayerMoney" , el , jobWeave [ 1 ], jobWeave [ 2 ])
else
jobTarget = 1
showMarker ()
end
end
function showMarker ()
finishJob ( false )
local rnd = jobPoints [ jobTarget ]
jobMarker = createMarker ( rnd [ 1 ], rnd [ 2 ], rnd [ 3 ], "checkpoint" , 5 , 255 , 0 , 0 )
jobBlip = createBlip ( rnd [ 1 ], rnd [ 2 ], rnd [ 3 ], 12 )
addEventHandler ( "onClientMarkerHit" , jobMarker , displayNextCP )
end
function startJob ( veh )
jobTarget = 1
jobVehicle = veh
showMarker ()
setElementData ( localPlayer , "player:job" , "Dostawca Cementu" )
outputChatBox ( "#964B00Praca dostawca cementu: #ffffffJed? wed?ug ustalonej trasy dostaw." , _ , _ , _ , true )
end
addEvent ( "startJob" , true )
addEventHandler ( "startJob" , resourceRoot , startJob )
addEventHandler ( "onClientResourceStop" , resourceRoot , function()
if getElementData ( localPlayer , "player:job" ) == "Dostawca Cementu" then
setElementData ( localPlayer , "player:job" , false )
end
end )
Tagi: nie :: pokazują :: się :: punkty
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: