Deleting a car by ID - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Deleting a car by ID (
/showthread.php?tid=309288)
Deleting a car by ID -
SnG.Scot_MisCuDI - 07.01.2012
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);
}
Re: Deleting a car by ID -
Richie - 07.01.2012
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);
}
}
Re: Deleting a car by ID -
SnG.Scot_MisCuDI - 07.01.2012
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);
Re: Deleting a car by ID -
Outcast - 07.01.2012
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);
}
}
Re: Deleting a car by ID -
SnG.Scot_MisCuDI - 07.01.2012
thanks +rep