View Single Post
E1_531G
Senior Member
Join Date: Dec 2017
Old 11-12-2018 , 11:04   Re: Basic array error?
Reply With Quote #4

About infochanged:
you need something more reliable.

Here, an example from RankSystem by OciXCrom:
PHP Code:
public client_infochanged(id)
{
    if(!
is_user_connected(id))
    {
        return
    }
        
    static const 
szKey[] = "name"
    
static szNewName[MAX_NAME_LENGTH], szOldName[MAX_NAME_LENGTH]
    
get_user_info(idszKeyszNewNamecharsmax(szNewName))
    
get_user_name(idszOldNamecharsmax(szOldName))
    
    if(!
equal(szNewNameszOldName))
    {        
        if(
g_eSettings[SAVE_TYPE] == SAVE_NICKNAME)
        {
            
use_vault(idszOldNameVAULT_WRITE)
            
use_vault(idszNewNameVAULT_READ)
            
update_hudinfo(id)
        }
        
        
set_task(DELAY_ON_CHANGE"update_vip_status"id)
    }

About spawnpost:
i think you have to add a little delay, 0.5 or 1 second. (at the round start the game applies new names for dead players, if any)
And use get_user_name() instead.
__________________
My English is A0

Last edited by E1_531G; 11-12-2018 at 11:05.
E1_531G is offline