09.01.2010, 11:51
how i can to know if the player clicked on ESC?
Originally Posted by dice7
emm, OnPlayerDisconnect ?
|
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;
}