Raised This Month: $ Target: $400
 0% 

How to restrict alias buy commands


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
reinert
Veteran Member
Join Date: Feb 2007
Old 05-09-2010 , 05:51   How to restrict alias buy commands
Reply With Quote #1

Hey, i've restricted awp buying via menu. but i can still buy it with my buy commands such as:

PHP Code:
bind "F4" ";awp; vesthelm; vest" 
how can i restrict it ?

my awp buying via menu code is:

PHP Code:
register_menucmd(-31,(1<<4),"via_me" )                                    
    
register_menucmd(-31,(1<<5),"via_me" )                                    
    
register_menucmd(register_menuid("BuyRifle",1),(1<<4),"via_me" )          
    
register_menucmd(register_menuid("BuyRifle",1),(1<<5),"via_me" )          
    
register_clcmd("awp","menu_awp"
    
register_clcmd("magnum","menu_awp")
    
register_clcmd("g3sg1","menu_awp")
    
register_clcmd("sg550","menu_awp"

public 
via_me(id,key)
{
    new 
team get_user_team(id)

    if ((
team==&& key==5) || (team==&& key==4))
        
menu_awp(idkey)
    if ((
team==&& key==4) || (team==&& key==5))
        
menu_awp(idkey)

    return 
PLUGIN_CONTINUE
}
public 
menu_awp(idkey){
    if(!
PlayerCon[id] || !PlayerAwp[id]){
    
engclient_cmd(id,"menuselect","10")
    
Message_No_Awp(id)
}
}

public 
Message_No_Awp(id){
    const 
HUD_PRINTCENTER    =    4
    
static const szOnlyVIP[] = "you are not user" 

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

reinert is offline
 



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 03:53.


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