SA-MP Forums Archive
Command for delete car - 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: Command for delete car (/showthread.php?tid=353210)



Command for delete car - tixzor - 22.06.2012

command for delete car? on zcmd?


Re: Command for delete car - Revo - 22.06.2012

Use the search function! I'm sure it's already posted here!


Re: Command for delete car - Jarnu - 22.06.2012

pawn Код:
CMD:dv(playerid, params[])
{
static
vehID
;
if ( sscanf( params, "i",  vehID ) )
return SendClientMessage( playerid, COLOR_RED, "SYNTAX: /dv < vehID >" );

if ( vehID == INVALID_VEHICLE_ID )
return SendClientMessage( playerid, COLOR_RED, "ERROR: Invalid vehicle ID." );

DestroyVehicle(vehID);
return 1;
}
there you go. USAGE: /dv [vehicleid]


Re: Command for delete car - judothijs - 22.06.2012

pawn Код:
CMD:use search button
{
      return 1;
}



Re: Command for delete car - tixzor - 22.06.2012

how to make when you on this car not ids


Re: Command for delete car - Rudyy - 22.06.2012

pawn Код:
CMD:dv(playerid, params[])
{
DestroyVehicle(GetPlayerVehicleID(playerid));
return 1;
}
This?

or maybe

pawn Код:
CMD:dv(playerid, params[])
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) return SendClientMessage(playerid, Grey, "You are not in a vehicle.");
DestroyVehicle(GetPlayerVehicleID(playerid));
return 1;
}