Raised This Month: $ Target: $400
 0% 

Buy menu plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pizzaman_
Junior Member
Join Date: Dec 2011
Location: vnzla
Old 06-16-2012 , 20:32   Buy menu plugin
Reply With Quote #1

this plugin works fine but now i want to change some stuff, want to disable all features in the menu except no recoil and invisibility so plugin help my 4fun server


this is main menu:

"SilentWalk",
"NoClip",
"Chameleon",
"Unlimited Ammo",
"Invisibility",
"NoFlash",
"NoRecoil",
"Speed"

i just want NoRecoil and Invisibility features, thank you all
Attached Files
File Type: sma Get Plugin or Get Source (Buy_Menu.sma - 594 views - 4.7 KB)
pizzaman_ is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 06-16-2012 , 22:37   Re: Buy menu plugin
Reply With Quote #2

PHP Code:
#include <amxmodx> 
#include <cstrike> 
#include <fun> 
#include <engine>

new bool:norecoil[33]

new 
pcvars[3]
new 
Messages[][] ={
    
"Type /buy to open up the buy menu!",
    
"Now No One Can See You!",
    
"Now You Have No Recoil!"
}
new 
Names[][] ={
    
"",
    
"Invisibility",
    
"NoRecoil"
}

public 
plugin_init() {
    
register_plugin("Buy_Menu","iMiNDFREAK","v1.8")
    
    
pcvars[0] = register_cvar("buy_menu","1")
    
pcvars[1] = register_cvar("buy_invisibility""1000"
    
pcvars[2] = register_cvar("buy_norecoil""1000"
    
    
register_clcmd"say /buy","ShowBuyMenu")
    
register_clcmd"say_team /buy","ShowBuyMenu")
    
    
register_event("CurWeapon","Change_Gun","be","1=1")
    
register_logevent("ResetBonuses"2"1=Round_End")
    
}

public 
ShowBuyMenu(id
{
    if(
get_pcvar_num(pcvars[0]) == 0
    { 
        
client_print(idprint_chat""
        return 
PLUGIN_HANDLED     
    

    
    new 
menu menu_create("Buy Menu" "buy_handle");
    
    new 
i=1,nr[3]
    new 
Form[50]
    for (
i=1i<sizeof Namesi++)
    {
        
format(nr,2,"%i",i)
        
format(Form,49,"%s: $%i",Names[i],get_pcvar_num(pcvars[i]))
        
menu_additem(menu ,Formnr 0);
    }
    
    
menu_setprop(menu MPROP_EXIT MEXIT_ALL);
    
    
menu_display(id menu 0);
    return 
PLUGIN_CONTINUE
}
public 
buy_handle(id menu item)
{    
    if(
item == MENU_EXIT
    {
        
client_print(idprint_chat"")
        
menu_destroy(menu);
    }
    
    new 
szCommand[6] , szName[64];
    new 
access callback;
    
    
menu_item_getinfo(menu item access szCommand szName 63 callback);
    
    new 
str_to_num(szCommand)
    new 
money cs_get_user_money(id
    new 
cost get_pcvar_num(pcvars[i])
    
    if(
money cost
    {
        
client_print(idprint_chat""cost
        return 
PLUGIN_HANDLED
    
}
    
    
cs_set_user_money(idmoney-cost,1)
    
client_print(idprint_chat"",Messages[i])
    switch (
i){
        
        case 
1set_user_rendering(id,kRenderFxNone0,0,0kRenderTransAdd,30
        case 
2:norecoil[id]=true
    
}
    
    return 
PLUGIN_HANDLED
}

public 
Change_Gun(id

    if (
norecoil[id])
    {
        
entity_set_vector(idEV_VEC_punchangleFloat:{0.00.00.0})
    }
    
    return 
PLUGIN_CONTINUE 
}

public 
RoundStart(id)
{
            
norecoil[id]=false
            set_user_rendering
(id,kRenderFxNone0,0,0kRenderNormal,255)

__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
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:11.


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