Car color command.
#5

Try this:

Код:
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 0;
}
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)