/vehcolor CMD Problem.
#10

Download sscanf and ZCMD and here's the command.

Код:
CMD:vehcolor(playerid, params[])
{
    new color1, color2;

    if(!IsPlayerInAnyVehicle(playerid))
        return SendClientMessage(playerid, -1, "Error: You must be in a vehicle.");
    if(sscanf(params, "dd", color1, color2))
        return SendClientMessage(playerid, -1, "USAGE: /vehcolor [color] [color]");
    if(color1 < 0 || color1 > 255 | color2 < 0 || color2 > 255)
        return SendClientMessage(playerid, -1, "Error: You have entered an invalid color ID.");

    ChangeVehicleColor(GetPlayerVehicleID(playerid), color1, color2);

    SendClientMessage(playerid, -1, "SERVER: You have successfully changed the color of your vehicle.");

    return 1;
}
This should do it.

Just make sure to add sscanf and ZCMD to your script properly.
Reply


Messages In This Thread
/vehcolor CMD Problem. - by TitanForceGeneral - 16.08.2015, 10:35
Re: /vehcolor CMD Problem. - by LetsOWN[PL] - 16.08.2015, 10:46
Re: /vehcolor CMD Problem. - by ZToPMaN - 16.08.2015, 10:57
Re: /vehcolor CMD Problem. - by TitanForceGeneral - 16.08.2015, 11:12
Re: /vehcolor CMD Problem. - by Denying - 16.08.2015, 11:13
Re: /vehcolor CMD Problem. - by MarvinPWN - 16.08.2015, 11:13
Re: /vehcolor CMD Problem. - by TitanForceGeneral - 16.08.2015, 11:15
Re: /vehcolor CMD Problem. - by MarvinPWN - 16.08.2015, 11:17
Re: /vehcolor CMD Problem. - by TitanForceGeneral - 16.08.2015, 11:23
Re: /vehcolor CMD Problem. - by Denying - 16.08.2015, 11:29

Forum Jump:


Users browsing this thread: 3 Guest(s)