Paint Cmd - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread:  Paint Cmd (
/showthread.php?tid=320750)
 
Paint Cmd - 
[TDL]OGLoc -  24.02.2012
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;
    }
 
Re: Paint Cmd - 
brett7 -  24.02.2012
What is the problem, does it not work or do you get errors or something?
Respuesta: Paint Cmd - 
[TDL]OGLoc -  24.02.2012
It doesn't work.
Re: Paint Cmd - 
KreeDz -  24.02.2012
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 

.