View Single Post
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-07-2008 , 00:27   Re: New Round / Player Spawn / Round Start / Round End - do Not mess it
Reply With Quote #84

If you don't want to use fakemeta, you can try this, should work (it seems to work but i haven't tested it enough).
PHP Code:
#include <amxmodx>

#define MAX_PLAYERS    32

new bool:g_bPlayerNonSpawnEvent[MAX_PLAYERS+1]
new 
bool:g_bJustTiggeredFullupdate[MAX_PLAYERS+1]
new 
g_iMaxPlayers

public plugin_init()
{
    
register_pluginPLUGINVERSIONAUTHOR )

    
register_event("ResetHUD""Event_ResetHUD""b")
    
register_event("TextMsg""Event_TextMsg_GameWillRestartIn""a""2=#Game_will_restart_in")

    
register_clcmd("fullupdate""ClientCommand_fullupdate")

    
g_iMaxPlayers get_maxplayers()
}

public 
Event_TextMsg_GameWillRestartIn()
{
    static 
id
    
for(id 1id <= g_iMaxPlayers; ++id)
        if( 
is_user_alive(id) )
            
g_bPlayerNonSpawnEvent[id] = true
}

public 
ClientCommand_fullupdate(id)
{
    
g_bPlayerNonSpawnEvent[id] = true
    g_bJustTiggeredFullupdate
[id] = true
}

public 
client_command(id)
{
    if(
g_bJustTiggeredFullupdate[id])
    {
        
g_bPlayerNonSpawnEvent[id] = false
        g_bJustTiggeredFullupdate
[id] = false
    
}
}

public 
Event_ResetHUD(id)
{
    if(!
is_user_alive(id))
        return

    if(
g_bPlayerNonSpawnEvent[id])
    {
        
g_bPlayerNonSpawnEvent[id] = false
        
return
    }

    
PlayerSpawn(id)
}

PlayerSpawn(id)
{
    
// do stuff here

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline