View Single Post
JusTGo
Veteran Member
Join Date: Mar 2013
Old 03-18-2018 , 19:43   Re: Function on player spawn, how to set index?
Reply With Quote #2

change :

PHP Code:
public fwHamPlayerSpawnPost(id)
{
    if (
is_user_alive(id))
    {
        if (!
get_cvar_num("gn_impulse"))
        {
            return 
PLUGIN_CONTINUE
        
}

        new 
players[32]
        new 
playercount
        get_players
(playersplayercount)

        new 
i
        
for (i=0i<playercounti++)
        {
            
giveWeapons(players[i])
        }
    }

    return 
PLUGIN_CONTINUE

to:

PHP Code:
public fwHamPlayerSpawnPost(id)
{
    if (
is_user_alive(id))
    {
        if (!
get_cvar_num("gn_impulse"))
        {
            return 
PLUGIN_CONTINUE
        
}

        
giveWeapons(id)
    }

    return 
PLUGIN_CONTINUE

__________________
JusTGo is offline