/setcolour for VIPs only help
#6

Quote:
Originally Posted by Tomer!.$
Посмотреть сообщение
Oops, I didn't get you right.
I thought you wanted him to be able to set everyone's color, so that's what the command I posted above does.

But here you go, I made you a new command, using this he will only be able to set his own color.
PHP код:
CMD:dcolor(playeridparams[])
{
    if(
PlayerInfo[playerid][dRank] < 1) return SendClientMessage(playeridred"[Error] You are not authorised to use this command.");
    else
    {
        new 
string[84],
            
color;
        if(
sscanf(params"d"color))
        {
            
SendClientMessage(playeridwhite"[Usage] /dcolor [Color ID]");
            
SendClientMessage(playeridwhite"[Info] Colours: 0=black 1=white 2=red 3=orange 4=yellow 5=green 6=blue 7=purple 8=brown 9=pink");
            return 
1;
        }
        
format(stringsizeof(string), "[SUCCESS] You set your color to %d."color);
        
SendClientMessage(playeridwhitestring);
        
SetPlayerColor(playeridcolor);
    }
    return 
1;

It will set the color to 0 or 1 for example. Almost what you did, but instead of setting the color, switch the color and set the specific color.
pawn Код:
switch( color )
{
    case 0: SetPlayerColor(playerid, 0x000000FF);
    case 1: SetPlayerColor(playerid, 0xFFFFFFFF);
    case 2: SetPlayerColor(playerid, 0xFF0000FF);
    case 3: SetPlayerColor(playerid, /* orange here */);
    case 4: SetPlayerColor(playerid, 0xFFFF00FF);
    case 5: SetPlayerColor(playerid, 0x00FF00FF);
    case 6: SetPlayerColor(playerid, 0x0000FFFF);
    case 7: SetPlayerColor(playerid, /* purple here */);
    case 8: SetPlayerColor(playerid, /* brown here */);
    case 9: SetPlayerColor(playerid, /* pink here */);
}
Reply


Messages In This Thread
/setcolour for VIPs only help - by Ponii - 03.09.2013, 23:58
Re : /setcolour for VIPs only help - by Matnix - 04.09.2013, 00:52
Re: /setcolour for VIPs only help - by Tomer!.$ - 04.09.2013, 04:23
Re: /setcolour for VIPs only help - by Tomer!.$ - 04.09.2013, 05:13
Re: /setcolour for VIPs only help - by Ponii - 07.09.2013, 08:22
Re: /setcolour for VIPs only help - by Konstantinos - 07.09.2013, 09:40

Forum Jump:


Users browsing this thread: 3 Guest(s)