26.02.2013, 16:16
PHP код:
forward CheckArea();
public CheckArea()
{
foreach(Player, i)
{
if(IsPlayerConnected(i))
{
if(GetClanId(Hq1) != -1)
{
GangZoneShowForPlayer(i,GangZoneHq[0],ClanInfo[GetClanId(Hq1)][ClanColorR] == -1 ? COLOR_BLACK : rgba2hex(ClanInfo[GetClanId(Hq1)][ClanColorR], ClanInfo[GetClanId(Hq1)][ClanColorG], ClanInfo[GetClanId(Hq1)][ClanColorB], 100));
}
new count[MAX_PLAYERS],string[100];
if(isPlayerInArea(i,HqAreas[0]) && count[i] == 0)
{
count[i] = 1;
if(equal(PlayerInfo[i][Clan], ClanInfo[GetClanId(Hq1)][ClanName]))
{
format(string,sizeof(string),"Welcome to your hq");
SendClientMessage(i, COLOR_YELLOW, string);
}
else
{
SendClientMessage(i, COLOR_YELLOW, "."Welcome to ""Hq1"" Hq ");
format(string,sizeof(string),"!! фмщ мофчгъ дчмап %s **", GetName(i));
SendClanMessage(ClanInfo[GetClanId(Hq1)][ClanName],COLOR_PINK, string);
}
if(!isPlayerInArea(i,HqAreas[0]) && count[i] == 1) count[i] = 0;
}
}
}
return true;
}