CMD:untunemycar(playerid, params[]) {
new
vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid == 0)
return SendClientMessage(playerid, 0, "ERROR: You must own this vehicle to untune it");
for(new i = 0; i < 14; i++){
RemoveVehicleComponent(vehicleid, GetVehicleComponentInSlot(vehicleid, i));
}
VehicleInfo[vehicleid][mod1] = 0;
VehicleInfo[vehicleid][mod2] = 0;
VehicleInfo[vehicleid][mod3] = 0;
VehicleInfo[vehicleid][mod4] = 0;
VehicleInfo[vehicleid][mod5] = 0;
VehicleInfo[vehicleid][mod6] = 0;
VehicleInfo[vehicleid][mod7] = 0;
VehicleInfo[vehicleid][mod8] = 0;
VehicleInfo[vehicleid][mod9] = 0;
VehicleInfo[vehicleid][mod10] = 0;
VehicleInfo[vehicleid][mod11] = 0;
VehicleInfo[vehicleid][mod12] = 0;
VehicleInfo[vehicleid][mod13] = 0;
VehicleInfo[vehicleid][mod14] = 0;
VehicleInfo[vehicleid][mod15] = 0;
VehicleInfo[vehicleid][mod16] = 0;
VehicleInfo[vehicleid][mod17] = 0;
VehicleInfo[vehicleid][paintjob] = -1;
VehicleInfo[vehicleid][color_2] = -1;
VehicleInfo[vehicleid][color_1] = -1;
return 1;
}
CMD:untuneallcars(playerid, params[])
{
if(!IsPlayerAdmin(playerid))
return SendClientMessage(playerid, -1 ,"You are not administrator.");
SendClientMessage(playerid, -1, "All cars has been untuned.");
for(new i; i != MAX_VEHICLES; i++)
{
for(new j; j != 14; j++)
{
if(i != INVALID_VEHICLE_ID)
{
RemoveVehicleComponent(i, GetVehicleComponentInSlot(i, j));
/*VehicleInfo[i][mod1] = 0;
VehicleInfo[i][mod2] = 0;
VehicleInfo[i][mod3] = 0;
VehicleInfo[i][mod4] = 0;
VehicleInfo[i][mod5] = 0;
VehicleInfo[i][mod6] = 0;
VehicleInfo[i][mod7] = 0;
VehicleInfo[i][mod8] = 0;
VehicleInfo[i][mod9] = 0;
VehicleInfo[i][mod10] = 0;
VehicleInfo[i][mod11] = 0;
VehicleInfo[i][mod12] = 0;
VehicleInfo[i][mod13] = 0;
VehicleInfo[i][mod14] = 0;
VehicleInfo[i][mod15] = 0;
VehicleInfo[i][mod16] = 0;
VehicleInfo[i][mod17] = 0;
VehicleInfo[i][paintjob] = 0;
VehicleInfo[i][color_2] = 0;
VehicleInfo[i][color_1] = 0;*/
}
}
}
return true;
}
a command to remove the parties tuneds from to all vehicles of the server ?
Try this, i'm not sure if it does, but it should be. PHP код:
|