Pause bug
#3

Seems many people complaining about it, this code below should disable the player who is tabbed/paused from dying.

pawn Код:
#define STATE_ONPLAYERCONNECT    (0)
#define STATE_ONPLAYERDISCONECT  (1)
#define STATE_ONPLAYERUPDATE     (2)

new stock
    PlayerState[ MAX_PLAYERS ], StartOPUTick[ MAX_PLAYERS ];

public OnPlayerConnect(playerid) return PlayerState[ playerid ] = STATE_ONPLAYERCONNECT, true;
public OnPlayerDisconnect(playerid, reason) return PlayerState[ playerid ] = STATE_ONPLAYERDISCONECT, true;
public OnPlayerUpdate(playerid) return PlayerState[ playerid ] = STATE_ONPLAYERUPDATE, StartOPUTick[ playerid ] = gettime(), true;

public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    if( hittype == BULLET_HIT_TYPE_PLAYER && PlayerState[ hitid ] == STATE_ONPLAYERUPDATE && ( gettime() - 10 >= StartOPUTick[ hitid ]) ) return false;
    else return true;
}
Reply


Messages In This Thread
Pause bug - by Cypress - 19.01.2014, 11:23
Re: Pause bug - by Lordzy - 19.01.2014, 11:33
Re: Pause bug - by Patrick - 19.01.2014, 11:45
Re: Pause bug - by Cypress - 19.01.2014, 12:06
Re: Pause bug - by Zhao - 20.01.2014, 09:20
Re: Pause bug - by Cypress - 20.01.2014, 12:39
Re: Pause bug - by Riddick94 - 20.01.2014, 13:03
Re: Pause bug - by Zhao - 20.01.2014, 13:52

Forum Jump:


Users browsing this thread: 1 Guest(s)