Car deleting/despawning ??
#5

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.
Reply


Messages In This Thread
Car deleting/despawning ?? - by lawonama - 18.06.2011, 22:21
Re: Car deleting/despawning ?? - by sleepysnowflake - 18.06.2011, 22:23
Re: Car deleting/despawning ?? - by lawonama - 18.06.2011, 22:30
Re: Car deleting/despawning ?? - by lawonama - 18.06.2011, 22:36
Re: Car deleting/despawning ?? - by sleepysnowflake - 18.06.2011, 22:40
Re: Car deleting/despawning ?? - by lawonama - 18.06.2011, 22:45
Re: Car deleting/despawning ?? - by sleepysnowflake - 18.06.2011, 22:48
Re: Car deleting/despawning ?? - by Madsen - 18.06.2011, 23:51
Re: Car deleting/despawning ?? - by lawonama - 19.06.2011, 09:50

Forum Jump:


Users browsing this thread: 3 Guest(s)