21.05.2011, 15:15
Hey guys,
I'm developing a server and I started with "Raven's Roleplay" and started editing it. Now I have been trying to put colored names for faction members. Example, if the person is from the faction Tattaglia, his name color to be Yellow. The problem is that when I put it into the script, everything seems to work, no errors at all, but only the FIRST person who join the server receives the name color, I mean, only the player with the ID "0" gets the color for his faction and the others dont. The colors and information are all defined, the problem is how to make each players receive its color at the same time. How can I fix this?
Here is the code I'm using:
And when the player spawn I putted this code
Obs: The function to spawn is nto only SpawnPlayer.
I'm developing a server and I started with "Raven's Roleplay" and started editing it. Now I have been trying to put colored names for faction members. Example, if the person is from the faction Tattaglia, his name color to be Yellow. The problem is that when I put it into the script, everything seems to work, no errors at all, but only the FIRST person who join the server receives the name color, I mean, only the player with the ID "0" gets the color for his faction and the others dont. The colors and information are all defined, the problem is how to make each players receive its color at the same time. How can I fix this?
Here is the code I'm using:
Код:
public FactionColor(playerid) { if(gPlayerLogged[playerid] == 1) { if(PlayerInfo[playerid][pLeader] == 6)//------------Scarpetta Leader------------------ { SetPlayerColor(playerid,0x800000FF); return 1; } else if(PlayerInfo[playerid][pLeader] == 14)//------Giordano Leader------------------- { SetPlayerColor(playerid,0x800000FF); return 1; } else if(PlayerInfo[playerid][pMember] == 6)//-------Scarpetta------------------------- { SetPlayerColor(playerid,0xEAEA00FF); return 1; } else if(PlayerInfo[playerid][pMember] == 14)//------Giordano-------------------------- { SetPlayerColor(playerid,0xFF0000FF); return 1; } else //---------------------------------------------Civilian-------------------------- { SetPlayerColor(playerid,0xFFFFFFFF); return 1; } return 0; } return 0; }
Код:
SpawnPlayer(playerid); SetTimer("FactionColor", 1000, 0);