11.01.2014, 22:18
Hi.
I was wandering if it was possible to make a /vehdestroy that will destroy all the admin spawned cars?
Here is the command to spawn them:
Is it possible to make a command to destroy the vehicles that command creates? and if so How?
Thanks
I was wandering if it was possible to make a /vehdestroy that will destroy all the admin spawned cars?
Here is the command to spawn them:
Код:
CMD:veh(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use this command-");
new car, col1, col2, string[126];
if(sscanf(params, "iii", car, col1, col2)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]");
if(car < 400 || car > 611) return SendClientMessage(playerid, COLOR_GREY, "Vehicle number can't be below 400 or above 611!");
if(col1 < 0 || col1 > 256) return SendClientMessage(playerid, COLOR_GREY, "Color number can't be below 0 or above 256!");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = AddStaticVehicleEx(car, X+2,Y+2,Z+1, 0.0, col1, col2, 60000);
format(string, sizeof(string), "Vehicle %d spawned.", carid);
SendClientMessage(playerid, COLOR_GREY, string);
}
return 1;
}
Thanks


