25.08.2012, 19:32
Try this.
pawn Код:
dcmd_vkill(playerid,params[])
{
if(AccInfo[playerid][Level] >= 1 || AccInfo[playerid][pVip] >= 1)
{
if(!strlen(params)) return
SendClientMessage(playerid, 0xFFFFFFFF, "{FFFF00}Usage: /vkill [VehicleID]") &&
SendClientMessage(playerid, 0xFFFFFFFF, "{FF9900}Function: Will destroy specified vehicle");
new vid;
vid = strval(params);
if(GetVehicleModel(vid) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Invalid Vehicle ID");
SendCommandToAdmins(playerid,"vkill");
DestroyObject(SirenObject[vid]);
DelVehicle(vid);
new string[64];
format(string,sizeof(string),"You have destroyed Vehicle ID: %d", vid);
return SendClientMessage(playerid, BlueMsg, string);
}
else return ErrorMessages(playerid, 1);
}