Quote:
Originally Posted by Berlovan
pawn Код:
new UsualCar; // Top of script
UsualCar = CreateVehicle(415, 2135.12, -2552.65, 13.55, 90, 0, 0, 100000000000000000000000000); //OnGameModeInit
/////////////////////////////////// [ Your Code ] ////////////////////////////////////////////////////
if(IsPlayerInAnyVehicle(playerid)) { SendClientMessage(playerid, 0xFFFFFFFF, "You are already in a vehicle, leave your car to spawn a new one."); } else PutPlayerInVehicle(playerid,UsualCar,0); SetCameraBehindPlayer(playerid); ////////////////////////////////////////////////// [ Sum Code ] //////////////////////////////////////////////////
public OnPlayerExitVehicle(playerid, vehicleid) { if(vehicleid == UsualCar) { DestroyVehicle(UsualCar); } return 1; }
Try this.
|
so with this code you can destroy all vehicles with the variable usualcar or is it only 1?