14.10.2013, 03:03
So I have admin only chat but I want faction only chat and I don't even know how because I think it would involve two loops
Here is the callback I use for the admin only chat
Heres what the Faction chat needs to have
but to get the x variable I need another loop
how do I merge those loops together to work in the fuction?
Here is the callback I use for the admin only chat
PHP код:
public SendAdminMessage(color,string[])
{
foreach(Player,i)
{
if(PlayerInfo[i] [pAdmin] >= 1 && GetPVarInt(i, "on_adminduty"))
{
SendClientMessage(i,color,string);
}
}
return 1;
}
PHP код:
public SendFactionMessage(color,string[])
{
foreach(Player,i)
{
if(PlayerInfo[i] [Faction] == FactionInfo[x][factionid]))
{
SendClientMessage(i,color,string);
}
}
return 1;
}
PHP код:
for(new i=1;i<MAX_FACTION;i++)