21.07.2014, 13:16
Hi,
I have a command for players (/veh) where they can choose a car from a menu and then it'll automatically spawn for them. But when 5 people are spawning cars without the cars disappearing the server will become a huge mess.
After the players have selected a car, this happens.
Could anyone help me make it so that when the player dies, all the cars they have spawned get destroyed?
I have a command for players (/veh) where they can choose a car from a menu and then it'll automatically spawn for them. But when 5 people are spawning cars without the cars disappearing the server will become a huge mess.
After the players have selected a car, this happens.
Код:
{
new Float:pos[3], Float:angle, veh;
GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
if(IsPlayerInAnyVehicle(playerid)) GetVehicleZAngle(GetPlayerVehicleID(playerid), angle), DestroyVehicle(GetPlayerVehicleID(playerid));
else GetPlayerFacingAngle(playerid, angle);
veh = CreateVehicle(vehicleid, pos[0], pos[1], pos[2], angle, -1, -1, 99999);
SetVehicleNumberPlate(veh, "{00CCFF}EXFR 2013x");
SetVehicleToRespawn(veh);
PutPlayerInVehicle(playerid, veh, 0);
return 1;
}



)