Button ESC
#5

Quote:
Originally Posted by TheInnocentOne
Quote:
Originally Posted by Carlton
pawn Код:
new
 PausedTimer;

public OnGameModeInit() {
  PausedTimer = SetTimer("CheckPaused", 1000, 1);
  return 1;
}

forward CheckPaused();
public CheckPaused() {
 for(new o = 0; o < GetMaxPlayers(); o++ ){
   if(GetPVarInt(o, "Paused") == 0) {
     // The player is paused / Pressed ESC.
   }
 }
 return 1;
}

public OnPlayerConnect(playerid) {
  SetPVarInt(playerid, "Paused", 0);
  return 1;
}

public OnPlayerUpdate(playerid) {
  SetPVarInt(playerid, "Paused", 1);
  return 1;
}
OnPlayerUpdate is NOT called for paused players..

So why are you setting them as paused there?
One: http://forum.sa-mp.com/index.php?topic=115828.0
Two: I never said it's called for paused players.
Three: I set them there because I wanted to, and that's the only way to find if someone ALT-Tabed or Pressed ESC.
Reply


Messages In This Thread
Button ESC - by _0wn3r_ - 12.06.2010, 22:01
Re: Button ESC - by TheInnocentOne - 12.06.2010, 22:04
Re: Button ESC - by Carlton - 12.06.2010, 22:06
Re: Button ESC - by TheInnocentOne - 12.06.2010, 22:10
Re: Button ESC - by Carlton - 12.06.2010, 22:14
Re: Button ESC - by _0wn3r_ - 12.06.2010, 22:17
Re: Button ESC - by TheInnocentOne - 12.06.2010, 22:18
Re: Button ESC - by Carlton - 12.06.2010, 22:19
Re: Button ESC - by Sergei - 12.06.2010, 22:20
Re: Button ESC - by Carlton - 12.06.2010, 22:22

Forum Jump:


Users browsing this thread: 1 Guest(s)