for(new i = 0; i < sizeof(Clans); i++)
{
if(KeyInfo[playerid][pRank] > 0 && KeyInfo[playerid][pClan] != 255)
{
new clan = KeyInfo[playerid][pClan];
new string[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(Clans[clan][Front] == 1)
{
format(string,sizeof(string),"[%s]%s: %s",Clans[clan][cName],name,text);
ProxDetector(20.0,playerid,string,GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid));
return 0;
}
else if(Clans[clan][Back] == 1)
{
format(string,sizeof(string),"%s[%s]: %s",name,Clans[clan][cName],text);
ProxDetector(20.0,playerid,string,GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid));
return 0;
}
}
}
enum ClanSystem
{
cName[MAX_PLAYER_NAME],
clOwner[MAX_PLAYER_NAME],
Front,
Back,
cID,
};
new Clans[100][ClanSystem];
public OnPlayerText(playerid, text[])
{
for(new i = 0; i < sizeof(Clans); i++)
{
if(KeyInfo[playerid][pRank] > 0 && KeyInfo[playerid][pClan] != 255)
{
new clan = KeyInfo[playerid][pClan];
new string[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(Clans[clan][Front] == 1)
{
format(string,sizeof(string),"[%s]%s: %s",Clans[clan][cName],name,text);
SendPlayerMessageToAll(playerid, string);
ProxDetector(20.0,playerid,string,GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid));
}
else if(Clans[clan][Back] == 1)
{
format(string,sizeof(string),"%s[%s]: %s",name,Clans[clan][cName],text);
SendPlayerMessageToAll(playerid, string);
ProxDetector(20.0,playerid,string,GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid),GetPlayerColor(playerid));
}
}
}
return 0;
}
not that either.. man the normal chat.. it just shows the tag next to the name also..
|