Names colors
#5

Not impossable,

if this is what you wanted:

it will make it so if you spawn with a tag in your name if it is found it will set your color to the tag color

pawn Код:
#include <a_samp>

#define MaxTags 5
new PlayerTags[MaxTags][] = {
    "[TAG1]",
    "[TAG2]",
    "[TAG3]",
    "[TAG4]",
    "[TAG5]"
};

new PlayerColors[MaxTags] = {
    0xE60000FF,
    0x1229FAFF,
    0x21DD00FF,
    0xFFFF00FF,
    0xF97804FF
};

main()
{
}

public OnPlayerConnect(playerid)
{
    new pName[30];
    GetPlayerName(playerid, pName, sizeof pName);
   
    for(new i = 0; i < MaxTags; i++)
    {
        if(strfind(pName, PlayerTags[i], false) != -1)
        {
            switch(i)
            {
            default:
            {
                    SetPlayerColor(playerid, PlayerColors[i]);
                    break;
            }
            }
        }
    }
}
Your welcome

Sorry i forgot what the colours are i think they are:

1: Red
2: Blue
3: Green
4: Dont Know
5: Yellow

Reply


Messages In This Thread
Names colors - by CJoao - 01.03.2008, 11:02
Re: Names colors - by Lenda - 01.03.2008, 11:15
Re: Names colors - by P1nd3r - 01.03.2008, 11:16
Re: Names colors - by stuntking14 - 15.05.2009, 22:26
Re: Names colors - by JaYmE - 16.05.2009, 00:01

Forum Jump:


Users browsing this thread: 1 Guest(s)