SA-MP Forums Archive
/vcolor usage - 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: /vcolor usage (/showthread.php?tid=361636)



/vcolor usage - kbalor - 21.07.2012

I have here vcolor command. Is it possible not to fill the second color or the /vcolor [0-255] [0-255]?
I mean, if playayer use /vcolor 1 the color of the vehicle changes without filling the other one.


Код:
COMMAND:vcolor(playerid, params[])
{
    new color1,color2;
    if(sscanf(params, "ii", color1, color2)) return SendClientMessage(playerid, COLOR_RED, "Usage: /vcolor [0-255] [0-255]");
    if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) return SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle.");
    ChangeVehicleColor(GetPlayerVehicleID(playerid),color1,color2);
    GameTextForPlayer(playerid,"~y~Vehicle Color Changed",2000,3);
    return 1;
}



Re: /vcolor usage - CoDeZ - 21.07.2012

erm i guess it should be like that
pawn Код:
if(sscanf(params,"i,"color1)) return SendClientMessage(playerid,COLOR_RED,"Usage /vcolor [0-255]
Maybe this should work


Re: /vcolor usage - kbalor - 21.07.2012

Quote:
Originally Posted by CoDeZ
Посмотреть сообщение
erm i guess it should be like that
pawn Код:
if(sscanf(params,"i,"color1)) return SendClientMessage(playerid,COLOR_RED,"Usage /vcolor [0-255]
Maybe this should work
No works. Something like that but without removing the color2 or the second color.