Matikmontana
Modern Stories
Wiek: 22 Na forum: 2473 dni Posty: 423
Nick w MP: Mazeusz*
Piwa : 1015
Witam, mam problem dotycz?cy blip-a, po zastosowaniu tego:
setElementParent ( createBlip ( e [ 1 ], e [ 2 ], e [ 3 ], 41 ), marker )
wszystko ?adnie dzia?a tylko ?e blip pokazuje si? wszystkim. Po zmianie na to:
setElementParent ( createBlip ( e [ 1 ], e [ 2 ], e [ 3 ], 41 , 0 , 0 , 0 , 255 , plr ), marker )
blip sie nie tworzy i wyskakuje b??d z
kod
local function showNextCP ( plr )
local idx = getElementData ( plr , "egzaminL_postep" )
local e = cp [ idx ]
if not e then
egzaminKoniec ( plr , true )
return
end
local marker = createMarker ( e [ 1 ], e [ 2 ], e [ 3 ], e . lotniczy and "ring" or "checkpoint" , 2 , 255 , 0 , 0 , 200 , plr )
setElementData ( plr , "egzaminL_marker" , marker )
setElementParent ( createBlip ( e [ 1 ], e [ 2 ], e [ 3 ], 41 , 0 , 0 , 0 , 255 , plr ), marker )
[ Dodano : 2021-02-06, 22:21 ]
addEventHandler ( "onMarkerHit" , resourceRoot , function( el , md )
if not isElement ( el ) or not md or getElementType ( el )~= "player" then return end
if getMarkerType ( source )== "cylinder" then
--[[if ( getElementData ( el , "player:license:pjC" ) or 0 )> 0 then
outputChatBox ( "Posiadasz ju? prawo jazdy kat.C" , el )
return
end ]]
egzaminStart ( el )
return
end
if not isElementVisibleTo ( source , el ) then return end
local postep = getElementData ( el , "egzaminL_postep" )
if not postep then return end -- nie powinno sie wydarzyc
if not cp [ postep ] then return end
local pojazd = getElementData ( el , "egzaminL_vehicle" )
if not pojazd then return end
setVehicleHandling ( pojazd , "maxVelocity" , cp [ postep ]. handling )
playSoundFrontEnd ( el , 12 )
destroyElement ( source )
if cp [ postep ]. text then
outputChatBox ( "Egzaminator m?wi: " .. cp [ postep ]. text , el , 255 , 255 , 100 )
end
postep = postep + 1
setElementData ( el , "egzaminL_postep" , postep )
showNextCP ( el )
end )
[ Dodano : 2021-02-06, 23:03 ]
Nie wa?ne mo?na zamkn??. Rozwi?zane
local blip = createBlip ( e [ 1 ], e [ 2 ], e [ 3 ], 41 , 2 , 0 , 0 , 0 , 255 , 0 , 200 , plr )
setElementParent ( blip , marker )