16.05.2009, 00:01
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
Your welcome
Sorry i forgot what the colours are i think they are:
1: Red
2: Blue
3: Green
4: Dont Know
5: Yellow
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;
}
}
}
}
}
Sorry i forgot what the colours are i think they are:
1: Red
2: Blue
3: Green
4: Dont Know
5: Yellow