Help with destroycdveh - 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: Help with destroycdveh (
/showthread.php?tid=442952)
Help with destroycdveh -
Grooty - 09.06.2013
Here's the code...
Код:
CMD:destroycdveh(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] < 1337)
{
SendClientMessageEx(playerid, COLOR_GREY, " You are not allowed to use this command.");
return 1;
}
new string[128], vehid;
if(sscanf(params, "d", vehid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /destroycdveh [vehicleid]");
DestroyCarDealershipVehicle(GetCarDealershipId(vehid), GetCarDealershipVehicleId(vehid));
SavecDealership(GetCarDealershipId(vehid));
format(string, sizeof(string), " SYSTEM: Car dealership vehicle destroyed (ID %d)", vehid);
SendClientMessageEx(playerid, COLOR_GRAD1, string);
return 1;
}
When I do it, it just says the string but it doesn't actually delete the car.
Re: Help with destroycdveh -
ReVo_ - 09.06.2013
Add DestroyVehicle (vehid);
Re: Help with destroycdveh -
Grooty - 09.06.2013
Quote:
Originally Posted by ReVo_
Add DestroyVehicle (vehid);
|
Where?
Re: Help with destroycdveh -
ReVo_ - 13.06.2013
Код:
CMD:destroycdveh(playerid, params[])
{
if (PlayerInfo[playerid][pAdmin] < 1337)
{
SendClientMessageEx(playerid, COLOR_GREY, " You are not allowed to use this command.");
return 1;
}
new string[128], vehid;
if(sscanf(params, "d", vehid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /destroycdveh [vehicleid]");
DestroyCarDealershipVehicle(GetCarDealershipId(vehid), GetCarDealershipVehicleId(vehid));
SavecDealership(GetCarDealershipId(vehid));
DestroyVehicle (vehid);
format(string, sizeof(string), " SYSTEM: Car dealership vehicle destroyed (ID %d)", vehid);
SendClientMessageEx(playerid, COLOR_GRAD1, string);
return 1;
}
to be sure, can you post DestroyCarDealershipVehicle function?