NoKill1997
Online
Wiek: 28 Na forum: 3224 dni Posty: 183
Nick w MP: Mefedroniarz.PDW
Piwa : 778
Problem polega na tym, ze w momencie kiedy dodaje Cuboida wyskakuje mi blad, ktorego moim zdaniem byc nie powinno. Za pomoc w naprowadzeniu do usterki daje zimne
.
addEvent ( "Wedkarz" , true )
addEventHandler ( "Wedkarz" , root , function()
outputChatBox ( "#00ff00✔ #ffffffRozpocze?es prace Wedkarza na Poziomie: #00ff001#ffffff." , source , 255 , 255 , 255 , true )
setElementData ( source , "praca_wedkarz" , true )
end )
addEvent ( "Wedkarzzakoncz" , true )
addEventHandler ( "Wedkarzzakoncz" , root , function()
setElementData ( source , "praca_wedkarz" , false )
end )
local wedkarz = createMarker ( 391.02 ,- 2088.58 , 7.84 - 1 , "cylinder" , 1.1 , 255 , 255 , 255 )
local missionText1 = createElement ( "text" )
setElementData ( missionText1 , "name" , "Miejsce ?owienia" )
setElementPosition ( missionText1 , 391.02 ,- 2088.58 , 7.84 + 1.2 )
function startJob ( thePlayer )
if not getElementData ( thePlayer , "praca_wedkarz" ) then
outputChatBox ( "#ff0000✖ #ffffffNie posiadasz rozpoczetej pracy!" , thePlayer , 255 , 0 , 0 , true )
return end
local theVehicle = getPedOccupiedVehicle ( thePlayer )
if not theVehicle then
outputChatBox ( "#00ff00✔ #ffffffRozpoczynasz po??w ryb!" , thePlayer , 0 , 255 , 0 , true )
setElementFrozen ( thePlayer , true )
setPedAnimation ( thePlayer , "SWORD" , "sword_block" , - 1 , false , false , true , true )
setTimer (function ()
setPedAnimation ( thePlayer , false )
setElementFrozen ( thePlayer , false )
local rand1 = math . random ( 0 , 1 )
if rand1 == 1 then
local rand2 = math . random ( 10000 , 20000 )
local rnd = math . random ( 10 , 15 )
outputChatBox ( "#00ff00✔ #ffffffOtrzymujesz: #00ff00" .. rand2 .. " #ffffffPLN oraz #00ff00" .. rnd .. " #ffffffREP!" , thePlayer , 0 , 255 , 0 , true )
givePlayerMoney ( thePlayer , rand2 )
local repek = getElementData ( thePlayer , "player:srp" )
local repka = repek + rnd
setElementData ( thePlayer , "player:srp" , repka )
else
outputChatBox ( "#ff0000✖ #ffffff?y?ka zerwa?a si?!" , thePlayer , 0 , 255 , 0 , true )
end
end , 5000 , 1 )
else
outputChatBox ( "#ff0000✖ #ffffffNajpierw wyjd? z pojazdu!" , thePlayer , 0 , 255 , 0 , true )
end
end
addEventHandler ( "onMarkerHit" , wedkarz , startJob )
local zone = createColCuboid ( 372.70 ,- 2083.00 , 7.84 26 , 4 , 7 )
addEventHandler ( "onColShapeLeave" , zone , function( el , md )
if source ~= zone then return end
if getElementData ( thePlayer , "praca_wedkarz" ) then
outputChatBox ( "" , thePlayer , 255 , 0 , 0 , true )
outputChatBox ( "" , thePlayer , 255 , 0 , 0 , true )
outputChatBox ( "#ff0000✖ #ffffffOdszedles ze stanowiska!" , thePlayer , 255 , 0 , 0 , true )
outputChatBox ( "#ff0000✖ #ffffffPraca zostala zakonczona" , thePlayer , 255 , 0 , 0 , true )
outputChatBox ( "" , thePlayer , 255 , 0 , 0 , true )
outputChatBox ( "" , thePlayer , 255 , 0 , 0 , true )
return end
setElementData ( source , "praca_wedkarz" , false )
end )
Linijka 58: local zone = createColCuboid ( 372.70 ,- 2083.00 , 7.84 26 , 4 , 7 )
SS bledu z DB3:
Podpis
Aktualny projekt: LSgame
Na scenie MTA od: 2015 roku.
Discord: Chwilowoo, brak