Witam pisz? prac?, mam problem z zako?czeniem pracy, dok?adnie nie wiem jak funkcje na wjazd w marker "marko" napisa?. Chodzi o to, ?e gdy wjedziemy w marker nazwany "marko" marker ten usuwa.
kod
local ciezarowka = createMarker (- 1976.12 , 1329.43 , 7.19 - 1.1 , "cylinder" , 2 , 255 , 170 , 0 , 100 )
function MarkerHit ( el2 )
if getElementData ( el2 , "player:ciezarowka" , true ) then
triggerClientEvent ( el2 , "onClientAddNotification" , el2 , "Posiadasz ju? zrespion? ci??ar?wk? !" , "info" )
return end
local veh = createVehicle ( 433 ,- 1955.59 , 1326.85 , 7.68 , 0.5 , 360.0 , 180.5 )
warpPedIntoVehicle ( el2 , veh , 0 )
setElementData ( el2 , "player:ciezarowka" , true )
ShowMarker ()
end
addEventHandler ( "onMarkerHit" , ciezarowka , MarkerHit )
function ShowMarker ()
local marko = createMarker (- 1891.13 , 1360.56 , 7.19 - 1.1 , "cylinder" , 4 , 255 , 170 , 0 , 100 )
end
Pr?bowa?em tak, lecz nic
function Koniec ()
destroyElement ( marko )
end
addEventHandler ( "onMarkerHit" , marko , Koniec )