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-08-2010 , 18:12   now allow to buy awp
Reply With Quote #1

Hey, can someone give me a code that blocks players buying awp.

i got a code that blocks picking up, and now i need to block buying...

BTW: Picking up code:
PHP Code:
public fwd_touch(entid)
{
    new 
model[33]
    
entity_get_string(entEV_SZ_modelmodel32)
    
pev(entpev_modelmodel31)
    if(
equali(model"models/w_awp.mdl")||equali(model"models/w_g3sg1.mdl")||equali(model"models/w_sg550.mdl")) 
    if(
PlayerCon[id] && PlayerAwp[id]) return FMRES_SUPERCEDE
    
return FMRES_IGNORED

reinert is offline
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 05-09-2010 , 02:30   Re: now allow to buy awp
Reply With Quote #2

there is a plugins, that who ever tries to buy an awp gets kicked from the server, how ever i dont know the name of it
SaM.ThE.MaN is offline
Aykay
Senior Member
Join Date: Jul 2009
Location: Australia
Old 05-09-2010 , 02:38   Re: now allow to buy awp
Reply With Quote #3

You do realize that this plugin comes with amxx when you install it?
Its actually on the second page of the amxmodmenu.
Just uncomment it from the plugins.ini - the plugin is called restmenu.amxx
__________________

Aykay is offline
Send a message via MSN to Aykay
reinert
Veteran Member
Join Date: Feb 2007
Old 05-09-2010 , 04:09   Re: now allow to buy awp
Reply With Quote #4

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
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 05-09-2010 , 08:45   Re: now allow to buy awp
Reply With Quote #5

you could make the script simpler
SaM.ThE.MaN is offline
reinert
Veteran Member
Join Date: Feb 2007
Old 05-09-2010 , 09:48   Re: now allow to buy awp
Reply With Quote #6

like... ?
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