Deleting a car by ID
#1

Ive seen this done in some servers. I tried making my own script but too much errors. I want a command so you can /dc (id) and it will destroy that car. Like when you do /dl and it shows the car id
This is what i TRIED to make
pawn Код:
CMD:dc(playerid, params[])
{
    if(IsPlayerLuxAdmin(playerid))
{
    return DelVehicle(vehicleid));
    SendClientMessage(playerid, COL_ADMIN, "Deleted car ID %i",vehicleid);
}
Reply
#2

pawn Код:
CMD:dc(playerid, params[])
{
    if(IsPlayerLuxAdmin(playerid))
    {
          new carid;
          if(sscanf(params, "d", carid)) return SendClientMessage(playerid, WHITE, "SYNTAX: /dc [carid]");
          DelVehicle(carid));
          SendClientMessage(playerid, COL_ADMIN, "Deleted car ID %i",carid);
    }
}
Reply
#3

pawn Код:
(284) : error 017: undefined symbol "DelVehicle"
(285) : warning 202: number of arguments does not match definition
pawn Код:
284: DelVehicle(carid);
285:           SendClientMessage(playerid, COL_ADMIN, "Deleted car ID %i",carid);
Reply
#4

pawn Код:
CMD:dc(playerid, params[])
{
    if(IsPlayerLuxAdmin(playerid))
    {
          new carid, msg[50];
          if(sscanf(params, "d", carid)) return SendClientMessage(playerid, WHITE, "SYNTAX: /dc [carid]");
          DestroyVehicle(carid));
          format(msg, sizeof(msg), "Deleted car ID %i", carid);
          SendClientMessage(playerid, COL_ADMIN, msg);
    }
}
Reply
#5

thanks +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)