في قوس ناقص , جربه كذا,
vehicle = {}
addEventHandler ( "onPlayerSpawn", root,
function ( )
if ( getPlayerTeam ( source ) ) then
if ( isElement ( vehicle[source] )) then
destroyElement ( vehicle[source] )
vehicle[source] = nil
end
local x, y, z = getElementPosition ( source )
vehicle[source] = createVehicle ( 411, x, y, z )
warpPedIntoVehicle ( source, vehicle[source] )
end
end
)
addEvent ( "car", true)
addEventHandler ( "car", root,
function ( )
if ( isElement ( vehicle[source] ) ) then
destroyElement ( vehicle[source] )
vehicle[source] = nil
end
local x, y, z = getElementPosition(source)
vehicle[source] = createVehicle(411, x, y, z)
warpPedIntoVehicle(source, vehicle[source])
end
)
addEventHandler ( "onPlayerQuit", root,
function ( )
if ( isElement ( vehicle[source] ) ) then
destroyElement ( vehicle[source] )
vehicle[source] = nil
end
end
)