-- Server Side #
local marker1 = createMarker (x,y,z,'cylinder',2,255,0,255,177 )
addEventHandler('onMarkerHit',marker1,function (plr)
if getElementType(plr) == 'player' and not isPedInVehicle(plr) then
if isElement(vehicle[plr]) then destroyElement(vehicle[plr]) vehicle[plr] = nil end
local x,y,z = getElementPosition(plr)
vehicle[plr] = createVehicle(id,x,y,z)
warpPedIntoVehicle(plr,vehicle[plr])
outputChatBox('Welcome to your car',plr,255,0,255,true)
end
end
)
addEventHandler('onVehicleExplode',resourceRoot,function()
setTimer(destroyElement,2000,1,source)
end
)
addEventHandler('onPlayerQuit',root,function()
if isElement(vehicle[source]) then
destroyElement(vehicle[source])
vehicle[source] = nil
end
end
)
كمل الي تبيه لأني ما فهمتك ,,