03.05.2013, 15:25
Hello!
It's me again..Now I have another problem...I made a command /carcolor [color1] [color2], but doesn't work. I get no errors or warnings...
Code:
Thanks
It's me again..Now I have another problem...I made a command /carcolor [color1] [color2], but doesn't work. I get no errors or warnings...
Code:
PHP код:
CMD:carcolor(playerid, params[])
{
new color1;
new color2;
new string[200];
new vehicleid;
if(sscanf(params, "ii", color1, color2)) return SendClientMessage(playerid, COLOR_ORANGE, "Usage: /carcolor [color1] [color2]");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You Are not in a vehicle!");
if(color1 < 0 || color1 > 20) return SendClientMessage(playerid, COLOR_RED, "ERROR: Invalid Color! (0-20)");
if(color2 < 0 || color2 > 20) return SendClientMessage(playerid, COLOR_RED, "ERROR: Invalid Color! (0-20)");
ChangeVehicleColor(vehicleid, color1, color2);
format(string, sizeof(string), "[SYSTEM]: %s Has Changed Color Of His Vehicle To %d | %d!", GetName(playerid), color1, color2);
SendClientMessageToAll(COLOR_DARKGREEN, string);
return 1;
}
