Raised This Month: $ Target: $400
 0% 

Admin VIP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ermac22
Junior Member
Join Date: Apr 2009
Old 07-15-2009 , 15:34   Admin VIP
Reply With Quote #1

How can i change this plugin to work only on admins with flag "h"?

Code:
#include <amxmodx>
#include <amxmisc>

new g_szVIPMap

public plugin_init()
{
    register_plugin("Admins are VIP's", "1.0", "PHP++")
    register_event("ResetHUD", "ResetHUD", "be")
    
    new szMapName[32]
    get_mapname(szMapName, 31)
    
    if (containi(szMapName, "as_") > -1)
        g_szVIPMap = 1
}

public ResetHUD(id)
{
    set_task(0.5, "VIP", id + 6910)
}

public VIP(TaskID)
{
    if (g_szVIPMap)
        return PLUGIN_HANDLED
        
    new id = TaskID - 6910
    
    if (is_user_admin(id))
    {
        message_begin(MSG_ALL, get_user_msgid("ScoreAttrib"))
        write_byte(id)
        write_byte(4)
        message_end()
    }
    
    return PLUGIN_HANDLED
}
Ermac22 is offline
Ermac22
Junior Member
Join Date: Apr 2009
Old 07-16-2009 , 05:02   Re: Admin VIP
Reply With Quote #2

No ideas?
Ermac22 is offline
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 07-16-2009 , 05:23   Re: Admin VIP
Reply With Quote #3

PHP Code:
if (is_user_admin(id)) 

PHP Code:
if (get_user_flags(id) & ADMIN_CFG
TheRadiance is offline
Send a message via ICQ to TheRadiance
Ermac22
Junior Member
Join Date: Apr 2009
Old 07-16-2009 , 11:02   Re: Admin VIP
Reply With Quote #4

Isnt work when iam T

Last edited by Ermac22; 07-16-2009 at 11:05.
Ermac22 is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 07-16-2009 , 11:28   Re: Admin VIP
Reply With Quote #5

If you're on a "as_" map this will block everything
Code:
 if (g_szVIPMap)
        return PLUGIN_HANDLED
remove it.
__________________

anakin_cstrike is offline
Ermac22
Junior Member
Join Date: Apr 2009
Old 07-16-2009 , 11:39   Re: Admin VIP
Reply With Quote #6

But how to make work when i am T?
Ermac22 is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 07-16-2009 , 11:54   Re: Admin VIP
Reply With Quote #7

Impossible.
__________________
xPaw 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 06:17.


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