Thread: [L4D2] Pause
View Single Post
pvtschlag
Member
Join Date: Nov 2009
Old 12-23-2009 , 05:24   Re: [L4D2] Pause
Reply With Quote #29

PHP Code:
public OnClientPutInServer(client)
{
    if (
g_bIsPaused && !g_bIsUnpausing && !IsFakeClient(client))
    {
        
Unpause(client);
        
CreateTimer(0.1Repauseclient);
        
PrintToChat(client"The game is paused. To resume the game use the !unpause command.");
    }
}

public 
Action:Repause(Handle:timerany:client)
{
    
Pause(client);

This is what I'm currently using, to make sure we are doing it the exact same way. Maybe you can try sticking this in my plugin and testing to see if it works like that. The timer may need to be increased. I think a .5 second unpause would be acceptable.

EDIT: Just read your edited post. I meant to unpause immediately and then a timer to repause as the code above shows.
pvtschlag is offline