25.10.2011, 09:56
I had a problem with the gamemode yesterday and commands bugged, so I started again.
I have carcolor command but any number I put the car was painted to black color. I wrote /carcolor 6 6 for yellow and it paints black. What is wrong?
I have carcolor command but any number I put the car was painted to black color. I wrote /carcolor 6 6 for yellow and it paints black. What is wrong?
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256], tmp[256], idx;
if(strcmp(cmd, "/carcolor", true) == 0) {
new color1, color2;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, -1, "USAGE: /carcolor [color1] [color2]");
color1 = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, -1, "USAGE: /carcolor [color1] [color2]");
color2 = strval(tmp);
ChangeVehicleColor(GetPlayerVehicleID(playerid), color1, color2);
return 1;
}
return 0;
}