09.01.2010, 12:32
pawn Код:
new IsInMenu[MAX_PLAYERS];
public OnFilterScriptInit()
{
SetTimer("MenuCheck", 1000, 1);
return 1;
}
public OnPlayerConnect(playerid)
{
IsInMenu[playerid] = 1;
return 1;
}
forward MenuCheck();
public MenuCheck()
{
for(new i;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(IsInMenu[playerid] == 0)
{
//player is in menu
}
IsInMenu[playerid] = 0;
}
}
}
public OnPlayerUpdate(playerid)
{
IsInMenu[playerid] = 1;
return 1;
}