18.06.2011, 22:40
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;
}