Raised This Month: $ Target: $400
 0% 

Restricting


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edgaras85
Senior Member
Join Date: Mar 2010
Location: Lithuania
Old 12-04-2010 , 15:19   Restricting
Reply With Quote #1

Can someone help, i made that Awp can buy only vip, it blocks Only Old styles Menu, but if choose in options->multiplayer->advanced-> buy menu type vgui menu it doesnt block Buy non-vip person...

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>
#include <cstrike>
#include <hamsandwich>
#include <engine>
#include <fun>

#define CanGetAwp(%1)    ( get_user_flags(%1) & ADMIN_LEVEL_H )

new gmsgTextMsg
new g_recievedbool:g_showrecieved;

public 
plugin_init()
{
    
register_menucmd(register_menuid("T_BuyRifle"1), (1<<4), "BuyRifle")
    
register_menucmd(register_menuid("T_BuyRifle"1), (1<<5), "BuyRifle")
    
register_menucmd(register_menuid("CT_BuyRifle"1), (1<<5), "BuyRifle")
    
register_menucmd(register_menuid("CT_BuyRifle"1), (1<<4), "BuyRifle")

    
gmsgTextMsg get_user_msgid("TextMsg")
}

public 
BuyRifle(id)
{
    if( !
CanGetAwpid ) )
    {
        
Message_No_Awp(id)
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE
}

Message_No_Awp(id)
{
    const 
HUD_PRINTCENTER    =    4
    
static const szOnlyVIP[] = "Only VIP can get zoom guns" 

    
message_begin(MSG_ONE_UNRELIABLEgmsgTextMsg, .player=id)
    
write_byteHUD_PRINTCENTER )
    
write_stringszOnlyVIP )
    
message_end()

__________________

Last edited by edgaras85; 12-04-2010 at 18:42.
edgaras85 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 11:16.


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