AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   getting specified nicks (https://forums.alliedmods.net/showthread.php?t=194462)

GhostMan 08-28-2012 16:12

getting specified nicks
 
How do i get only VIP's nicknames when they connect and print it to all the rest server's players?

PHP Code:

#define VIP_ACCESS_NOBUY ADMIN_LEVEL_B
public client_putinserver id )
{
    new 
name32 ];
    
    if ( 
get_user_flagsid ) & VIP_ACCESS_NOBUY )
    {
        
get_user_nameidname31 );
    }
    
    if ( 
get_pcvar_nump_Join ) && g_iRoundCount )
    {
        
ChatColor0"%L"LANG_PLAYER"VIP_JOIN"PREFIXname );
    }


This dont work

guipatinador 08-28-2012 16:40

Re: getting specified nicks
 
Colorchat don't support null indexs with ML.

PHP Code:

#define VIP_ACCESS_NOBUY ADMIN_LEVEL_B
public client_putinserverid )
{
    if ( 
get_user_flagsid ) & VIP_ACCESS_NOBUY && get_pcvar_nump_Join ) && g_iRoundCount )
    {
        new 
szName32 ]
        
get_user_nameidszNamecharsmaxszName ) )
        
        new 
players32 ]
        new 
num
        
new i
        
        get_players
playersnum"ch" )
        
        for( --
numnum >= 0num-- )
        {
            
playersnum ]
            
ChatColori"%L"LANG_PLAYER"VIP_JOIN"PREFIXszName )
        }
    }




All times are GMT -4. The time now is 05:53.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.