Paint Cmd
#1

Hey all i want to make this command. This command will paint a car with the colours ID's that the player choose.
Idk if i'm clear. Well i need it please. I make something, but it's wrong. Help!

pawn Код:
if(strcmp(cmd, "/paint", true) == 0)
    {
    if(GetPlayerTeam(playerid) == TEAM_MECANICOS)
    {
    if(IsPlayerInRangeOfPoint(playerid, 3.0,1100.9050,-1198.1736,17.8286))
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            new texto[256];
            texto = strrest(cmdtext,idx);
            new vColors[2];
            vehicleid = GetPlayerVehicleID(playerid);
            ChangeVehicleColor(vehicleid, vColors[0], vColors[1]);
            format(string,sizeof string,"Server: Cambiastes los Colores del auto por: %i - %i", vColors[0], vColors[1]);
            SendClientMessage(playerid,TEAM_MECANICOS_COLOR,string);
            }
        else
        {
            SendClientMessage(playerid,COLOR_ROJO,"Server: Usted no esta ubicado dentro de ningun vehiculo.");
        }
    }
    else
    {
        SendClientMessage(playerid,COLOR_ROJO,"Server: Usted no esta en el taller de Pintura");
    }
    }
    else
    {
        SendClientMessage(playerid,COLOR_ROJO,"Server: No eres miembro de los Mecanicos.");
    }
    return 1;
    }
Reply
#2

What is the problem, does it not work or do you get errors or something?
Reply
#3

It doesn't work.
Reply
#4

As far i as i see, the command is supposed to change the car's color to vColors[0] and [1].
Now, do the vColor[0] and [1] variables store the actual colors? Or are they just random variables that carry an invalid value ?

Other than that, does the actual command work? When you type it ingame, does it show the SendClientMessage text ? Or does it just not change the colors. Give more details .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)