Server
Cars = {}
addCommandHandler ( "Car",
function ( p )
if isElement ( Cars [ p ] ) then destroyElement ( Cars [ p ] ) Cars [ p ] = nil end
local x,y,z = getElementPosition ( p )
Cars [p] = createVehicle ( 535,x,y,z )
warpPedIntoVehicle(p,Cars [p])
outputChatBox('تم اعطائك السيارة!',p,255,0,0,true)
end
)
setTimer( function ()
for v in pairs( Cars ) do
if isElement( Cars [v] ) then
local R = math.random
setVehicleColor( Cars [v],R(0,255),R(0,255),R(0,255))
else
Cars [v] = nil
end
end
end, 1000, 0)
اسم الأمر Car