Изменение цвета авто для админа
Code
if(strcmp(cmd, "/vehcol", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] <= 1337))
{
SendClientMessage(playerid, COLOR_GRAD1, "Сервер: У вас нет прав на эту команду!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Использование: /vehcol [color1] [color2]");
return 1;
}
new color1;
color1 = strval(tmp);
if(color1 < 0 || color1 > 126)
{
SendClientMessage(playerid, COLOR_GREY, " Цвет машины не может быть меньше 0 и больше 126 !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Использование: /vehcol [color1] [color2]");
return 1;
}
new color2;
color2 = strval(tmp);
if(color2 < 0 || color2 > 126)
{
SendClientMessage(playerid, COLOR_GREY, " Цвет машины не может быть меньше 0 и больше 126 !");
return 1;
}
new veh = GetPlayerVehicleID(playerid);
ChangeVehicleColor(veh, color1, color2);
}
return 1;
}