02.09.2009, 16:01
You need to use strcmp to get the additional two parameters, color 1 and color 2.
pawn Код:
if(strcmp(cmd, "/color", true) == 0 || strcmp(cmd, "/colour", true) == 0)
{
new color1, color2, tmp[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /carcolor [color1] [color2]");
color1 = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /carcolor [color1] [color2]");
color2 = strval(tmp);
ChangeVehicleColor(GetPlayerVehicleID(playerid), color1, color2);
return 1;
}