Sanko_Bell
Дебютант
PHP:
stock AFKProcessor()
{
for(new x = 0; x < MAX_PLAYERS; x++)
{
if(IsPlayerConnected(x))
{
if(PlayerEx[x][ChekEx] < PlayerEx[x][TickEx])
{
if(PlayerEx[x][AFKEx] == true)
{
PlayerEx[x][VarEx] = 0;
PlayerEx[x][AFKEx] = false;
}
}
if(PlayerEx[x][AFKEx] == true)
{
PlayerEx[x][VarEx] ++;
}
if(PlayerInfo[x][pAdmin] <= 0)
{
if(PlayerEx[x][VarEx] > 300)
{
OnPlayerUpdateAc(x);
PlayerEx[x][VarEx] = 0;
SendClientMessage(x, COLOR_LIGHTRED, "Вы были отсоеденены от сервера! (AFK)");
Kick(x);
}
}
if(PlayerEx[x][VarEx] > 1)
{
new string[32];
format(string,sizeof(string), "[AFK] [%d секунд]", PlayerEx[x][VarEx]);
SetPlayerChatBubble(x, string, COLOR_GREEN, 30.0, 1200);
}
}
}
}
Последнее редактирование:
