/respawn error.
#2

Do it like this

pawn Код:
forward IsVehicleOccupied(vehicleid);

    if(strcmp(cmd, "/respawncars", true) == 0)
    {
    if (PlayerInfo[playerid][pAdmin] >=3)
        for(new i=0;i<MAX_VEHICLES;i++)
        {
            if(IsVehicleOccupied(i) == 0)
            {
            SetVehicleToRespawn(i);
          }
        }
    GetPlayerName(playerid,playername,sizeof(playername));
        format(string,sizeof(string),"[AdminCmd]: All vehicles respawned by Admin : %s",playername);
      SendClientMessageToAll(Admin, string);
      return 1;
    }

public IsVehicleOccupied(vehicleid)
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerInVehicle(i,vehicleid)) return 1;
    }
    return 0;
}
Reply


Messages In This Thread
/respawn error. - by MartinDaniel - 13.10.2009, 20:52
Re: /respawn error. - by Peter_Corneile - 13.10.2009, 21:55
Re: /respawn error. - by MartinDaniel - 13.10.2009, 22:04
Re: /respawn error. - by Peter_Corneile - 13.10.2009, 22:05
Re: /respawn error. - by MartinDaniel - 13.10.2009, 22:12
Re: /respawn error. - by Peter_Corneile - 13.10.2009, 22:15
Re: /respawn error. - by Jefff - 13.10.2009, 22:16
Re: /respawn error. - by Peter_Corneile - 13.10.2009, 22:17
Re: /respawn error. - by MartinDaniel - 13.10.2009, 22:19
Re: /respawn error. - by Peter_Corneile - 13.10.2009, 22:20

Forum Jump:


Users browsing this thread: 1 Guest(s)