الطريقة هذي مانصح فيها ابد . . لكن جرب يمكن يضبط
myMarker1 = createMarker( 1184.3974609375, -1315.8817138672, 12.572691917419, "cylinder", 2, 150, 150, 150, 160 )
myMarker2 = createMarker( 1174.0268554688, -1332.1184082031, 12.572691917419, "cylinder", 2, 150, 150, 150, 160 )
addEventHandler ( "onMarkerHit", myMarker1,
function ( hitPlayer )
if ( isPedInVehicle ( hitPlayer ) == false ) then
theData = getElementData ( hitPlayer , "theCar" )
if ( theData ) then
destroyElement ( theData )
end
x, y, z = getElementPosition ( hitPlayer )
myCar = createVehicle ( 481, x, y, z )
warpPedIntoVehicle ( hitPlayer, myCar )
setElementData ( hitPlayer, "theCar", myCar )
end
end
)
addEventHandler ( "onMarkerHit", myMarker2,
function ( hitPlayer )
if ( isPedInVehicle ( hitPlayer ) == false ) then
theData2 = getElementData ( hitPlayer , "theCar2" )
if ( theData2 ) then
destroyElement ( theData2 )
end
x, y, z = getElementPosition ( hitPlayer )
myCar2 = createVehicle ( 481, x, y, z )
warpPedIntoVehicle ( hitPlayer, myCar2 )
setElementData ( hitPlayer, "theCar2", myCar2 )
end
end
)