SpecialCar = { }
function MakeVehicles ( player )
if ( SpecialCar [ player ] ) and ( isElement ( SpecialCar [ player ] ) ) then
destroyElement ( SpecialCar [ player ] )
SpecialCar [ player ] = nil
end
SpecialCar [ player ] = createVehicle ( 557, -68.67147064209,-1119.7764892578,1.078125 )
warpPedIntoVehicle ( player,SpecialCar [ player ] )
end
addCommandHandler ( 'تفجير',
function ( player )
if ( SpecialCar [ player ] ) and ( isElement ( SpecialCar [ player ] ) ) then
blowVehicle ( SpecialCar [ player ] )
SpecialCar [ player ] = nil
end
end
)
addEvent('ttt',true)
addEventHandler('ttt',root,
function ( )
if ( getPlayerMoney ( source ) >= 20000 ) then
takePlayerMoney ( source,20000 )
MakeVehicles ( source )
end
end
)
addEventHandler ( 'onVehicleExplode',resourceRoot,
function ( )
setTimer ( destroyElement,3000,1,source )
end
)
addEventHandler ( 'onPlayerQuit',root,
function ( )
if ( SpecialCar [ source ] ) and ( isElement ( SpecialCar [ source ] ) ) then
destroyElement ( SpecialCar [ source ] )
SpecialCar [ source ] = nil
end
end
)