How to delete a specific vehicle ID?
#4

For the people above me.. You don't need to use sscanf if you're just using 1 parameter.
Here is a simple version for you to play around with:
pawn Code:
CMD:deleteveh(playerid, params[])
{
    if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, KLEUR_WIT, "You are not an Administrator.");
    else if(isnull(params)) return SendClientMessage(playerid, KLEUR_WIT, "{B4B5B7}USAGE: /deleteveh [vehicleid]");
    else
    {
        new vehicleid = strval(params);
        if(vehicleid == INVALID_VEHICLE_ID) return SendClientMessage(playerid,-1,"Not a vaild vehicle");
        DestroyVehicle(vehicleid);
        new string[128];        
        format(string, sizeof(string), "You succesfully deleted vehicle ID: %i", vehicleid);
        SendClientMessage(playerid,-1,string);
    }
    return 1;
}
Reply


Messages In This Thread
How to delete a specific vehicle ID? - by jessejanssen - 17.02.2012, 23:41
Re : How to delete a specific vehicle ID? - by ricardo178 - 18.02.2012, 00:12
Re: How to delete a specific vehicle ID? - by ReneG - 18.02.2012, 00:17
Re: How to delete a specific vehicle ID? - by Fj0rtizFredde - 18.02.2012, 00:21
Re: Re : How to delete a specific vehicle ID? - by ReneG - 18.02.2012, 00:21
Re : Re: Re : How to delete a specific vehicle ID? - by ricardo178 - 18.02.2012, 00:22
Re: How to delete a specific vehicle ID? - by Jefff - 18.02.2012, 00:32
Re: How to delete a specific vehicle ID? - by jessejanssen - 18.02.2012, 01:09

Forum Jump:


Users browsing this thread: 1 Guest(s)