Need a Respawn
#1

i need a /respawnallcars
Reply
#2

This is easy.

pawn Код:
command(rac, playerid, params[])
{
    for(new i = 0; i < MAX_VEHICLES; i++)
    {
        SetVehicleToRespawn(i);
    }
}
Is that all you want?
Reply
#3

Yes.
Reply
#4

But how can i add dis
if a player in a car it don't spawn how to make that?
Reply
#5

Quote:
Originally Posted by DerickClark
Посмотреть сообщение
But how can i add dis
if a player in a car it don't spawn how to make that?
This code will check if a player in a car or not.
pawn Код:
public VehicleOccupied(vehicleid)
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerInVehicle(i,vehicleid)) return 1;
}
return 0;
}
add this code into the iGetty's script.
pawn Код:
if(!VehicleOccupied(i))
{
SetVehicleToRespawn(i);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)