Car color command.
#1

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:

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;
}
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.
Reply


Messages In This Thread
Car color command. - by SA-MPDrifter - 14.07.2012, 12:06
Re: Car color command. - by Captain_Mani - 14.07.2012, 12:22
Re: Car color command. - by SA-MPDrifter - 14.07.2012, 12:26
Re: Car color command. - by Andi_Evandy - 14.07.2012, 12:30
Re: Car color command. - by Captain_Mani - 14.07.2012, 12:31
Re: Car color command. - by SA-MPDrifter - 14.07.2012, 12:35
Re: Car color command. - by Mark™ - 14.07.2012, 12:39
Re: Car color command. - by Andi_Evandy - 14.07.2012, 12:41
Re: Car color command. - by SA-MPDrifter - 14.07.2012, 12:42
Re: Car color command. - by Mark™ - 14.07.2012, 12:44

Forum Jump:


Users browsing this thread: 2 Guest(s)