14.07.2012, 12:06
Okay so bear with me here, I've tried pretty much everything I can think of to get this command working, it's only this command and nothing else. The script is:
Basically what happens after the command has been executed using the criteria it requires, it will just repeat the message telling you to type /cc (colorid1) (colorid2) even though I've already typed /cc 1 1 or any other number. Some help would be greatly appreciated, if anything else is required to solve this then please let me know, thanks and peace.
pawn Код:
CMD:cc( playerid, params[ ] )
{
new ColorID, ColorID2, vehicleid, str[75];
if(sscanf(params, "dd", ColorID,ColorID2)) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Usage:{FFFFFF} /cc (colorid1) (colorid2)");
else if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFAA, "{ff0000}Error: {ffffff}You are not in a vehicle!");
else if(ColorID < 0 && ColorID > 126) return SendClientMessage(playerid, 0xFF0000AA, "{FF0000}(!){CCCCCC}CarColor1 cannot be above 126 or below 0!");
else if(ColorID2 < 0 && ColorID2 > 126) return SendClientMessage(playerid, 0xFF0000AA, "{FF0000}(!){CCCCCC}CarColor2 cannot be above 126 or below 0!");
else
{
vehicleid = GetPlayerVehicleID(playerid);
ChangeVehicleColor(vehicleid, ColorID, ColorID2);
format(str, sizeof(str),"{FF0000}(!) {CCCCCC}Car Color changed.",ColorID, ColorID2);
SendClientMessage(playerid, 0x1B62E4FF, str);
}
return 1;
}