Raised This Month: $ Target: $400
 0% 

Help me FIX Admin Check


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MiloSx7
Member
Join Date: Oct 2011
Location: Serbia, Nish
Old 11-12-2011 , 05:42   Help me FIX Admin Check
Reply With Quote #1

PHP Code:
public ShowVIPOnline(id)
{
    if(
get_pcvar_num(p_VIPCheck) == 1)
    {
        new 
vipnames[33][64]
        
        if(
is_user_connected(0))
        {
            if(
get_user_flags(0) & ADMIN_LEVEL_C)
            {
                
get_user_name(0vipnames[0], charsmax(vipnames))
                
ColorChat(idGREEN"VIP Online: %s"vipnames[0], charsmax(vipnames))
            }
        }
        
        else 
        {
            
ColorChat(idGREEN"[^3V.I.P^4] ^1No ^3V.I.P-a ^1online")
            return 
PLUGIN_HANDLED
        
}
    }
    else
    {
        
ColorChat(idGREEN"[^3V.I.P^4] ^3V.I.P's ^1Online ^4DISABLEDD")
        return 
PLUGIN_HANDLED
    
}
    
    return 
PLUGIN_CONTINUE

It seems not to work, because i always see No VIP Online -.-
Can you help me somehow to fix this i know I'm near to the solution..
__________________
MiloS
MiloSx7 is offline
Send a message via MSN to MiloSx7
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-12-2011 , 05:57   Re: Help me FIX Admin Check
Reply With Quote #2

is_user_connected(0)

get_user_flags(0)

get_user_name(0

vipnames[0]

...

No comment.
__________________

Last edited by Arkshine; 11-12-2011 at 05:58.
Arkshine is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 11-12-2011 , 06:43   Re: Help me FIX Admin Check
Reply With Quote #3

your index should be ( id )
JoKeR LauGh is offline
Snaker beatter
Veteran Member
Join Date: Sep 2011
Location: Manila, Philippines
Old 11-12-2011 , 09:22   Re: Help me FIX Admin Check
Reply With Quote #4

Try to:

This:
PHP Code:
        if(is_user_connected(0))
        {
            if(
get_user_flags(0) & ADMIN_LEVEL_C)
            {
                
get_user_name(0vipnames[0], charsmax(vipnames))
                
ColorChat(idGREEN"VIP Online: %s"vipnames[0], charsmax(vipnames))
            }
        } 
Should be:
PHP Code:
        if(is_user_connected(id))
        {
            if(
get_user_flags(id) & ADMIN_LEVEL_C)
            {
                
get_user_name(idvipnamescharsmax(vipnames))
                
ColorChat(idGREEN"VIP Online: %s"vipnames)
            }
        } 
UNTESTED
__________________

Last edited by Snaker beatter; 11-12-2011 at 09:24.
Snaker beatter is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-12-2011 , 09:26   Re: Help me FIX Admin Check
Reply With Quote #5

if(is_user_connected(id))

This is useless since "say" command should registered with register_clcmd and no register_concmd and since even if it ise registered with register_concmd server cmd "say" can't be hooked with amxx default system.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:29.


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