Remove vehicle by ID
#5

Quote:
Originally Posted by Calg00ne
Посмотреть сообщение
You need to use U for player IDs and NOT vehicle IDs. Replace 'u' with 'd' and remove the 'else {' and '}' as the sscanf client message return will dismiss the command if the parameters aren't right.
Like this:

pawn Код:
dcmd_rvehicle(playerid, params[])
{
    if(IsPlayerAdmin(playerid)|| PlayerData[playerid][AdminLevel] > 3)
    {
        new string[128], vehicleid;
        if(sscanf(params, "d", vehicleid)) return SendClientMessage(playerid, COLOR_USAGE, "USAGE: /rvehicle (id)");
        {
            format(string, sizeof(string), "You removed vehicle nr.%d", vehicleid);
            SendClientMessage(playerid, COLOR_INFO, string);
           
            DestroyVehicle(vehicleid);
            return 1;
        }
    }
    return 0;
}
Reply


Messages In This Thread
Remove vehicle by ID - by Unknown123 - 06.03.2011, 13:02
Re: Remove vehicle by ID - by Serbish - 06.03.2011, 13:15
Re: Remove vehicle by ID - by Unknown123 - 06.03.2011, 13:22
Re: Remove vehicle by ID - by Calgon - 06.03.2011, 13:58
Re: Remove vehicle by ID - by Unknown123 - 06.03.2011, 14:19
Re: Remove vehicle by ID - by Calgon - 06.03.2011, 14:50
Re: Remove vehicle by ID - by Skylar Paul - 06.03.2011, 15:02

Forum Jump:


Users browsing this thread: 1 Guest(s)