Raised This Month: $ Target: $400
 0% 

now allow to buy awp


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
reinert
Veteran Member
Join Date: Feb 2007
Old 05-09-2010 , 04:09   Re: now allow to buy awp
Reply With Quote #1

ah, i wanted to make that if player is admin then he can buy if not, then just block buying.

EDIT: already found code. that works almost fine, just it won't show any message

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"
PHP Code:
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()

why message won't appear when i'm buying awp.
reinert 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 03:39.


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