بس اجي على الماركر بوقف وما يصير شي
يمكن انا وضعته غلط ...
function g()
setElementData(source,"xxx",tostring("Yes"))
end
addEventHandler("onPlayerJoin",root,g)
ma = createMarker (1556.6724853516,-1606.4342041016, 12.3, "cylinder", 2, 255, 0, 255, 150 )
vehicle = { }
function M( thePlayer )
get = getElementData(thePlayer,"xxx")
if get == "Yes" then
if not isPedInVehicle(thePlayer) then
x,y,z = getElementPosition( thePlayer )
if getElementModel( thePlayer ) == 287 then
vehicle[source] = createVehicle ( 596, x, y, z )
setVehicleColor(vehicle[source],27,54,160,255,255,255)
warpPedIntoVehicle(thePlayer,vehicle[source])
if isElement ( vehicle[source] ) then destroyElement ( vehicle[source] )
end
end
end
end
end
addEventHandler( "onMarkerHit", ma, M )