AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Show Meno One Time (https://forums.alliedmods.net/showthread.php?t=167973)

vitorcara 09-22-2011 13:45

Show Meno One Time
 
I wanted to open this menu once per round

PHP Code:

#include <amxmodx> 
#include <amxmisc> 
#include <cstrike> 
#include <fun> 

#define PLUGIN    "Armas"
#define AUTHOR    "MaxDK"
#define VERSION    "1.0"

new g_iOpened[33]

public 
plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd"say /armas","Armas"
    
register_clcmd"say_team /armas","Armas")

 
 
 } 
public 
client_authorized(id)
{
        
client_cmd(id,"bind ^"m^" ^"say /armas^"")
}
 public 
Armas(id)
 {
    new 
menu menu_create("\rAntiFurien: \^n\w (www.forca-portuguesa.com) :""menu_handler");
   
     
menu_additem(menu"AK47""1"0);
    
menu_additem(menu"M4A1""2"0);
    
menu_additem(menu"MP5 Navy""3"0);
    
menu_additem(menu"XM1014""4"0); 
    
menu_additem(menu"M3""5"0);
    
menu_additem(menu"AWP ""6"0);
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
   
    
menu_display(idmenu0);
 


 }
 public 
menu_handler(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);
    new 
key str_to_num(data);
 
    switch(
key)
    {
        case 
1:
        {
    
give_item(id"weapon_ak47")
    
give_item(id"weapon_deagle")
    
cs_set_user_bpammo(id,CSW_AK47,90)  
    
cs_set_user_bpammo(id,CSW_DEAGLE,35
        }
        case 
2:
        {
    
give_item(id"weapon_m4a1")
    
give_item(id"weapon_deagle")
    
cs_set_user_bpammo(id,CSW_M4A1,90)  
    
cs_set_user_bpammo(id,CSW_DEAGLE,35
        }
        case 
3
        {
    
give_item(id"weapon_mp5navy")
    
give_item(id"weapon_deagle")
    
cs_set_user_bpammo(id,CSW_MP5NAVY,120)  
    
cs_set_user_bpammo(id,CSW_DEAGLE,35
       }
case 
4
        {
    
give_item(id"weapon_xm1014")
    
give_item(id"weapon_deagle")
    
cs_set_user_bpammo(id,CSW_XM1014,32)  
    
cs_set_user_bpammo(id,CSW_DEAGLE,35
        }
case 
5
        {
        
    
give_item(id"weapon_m3")
    
give_item(id"weapon_deagle")
    
cs_set_user_bpammo(id,CSW_M3,32)  
    
cs_set_user_bpammo(id,CSW_DEAGLE,35
        }
    case 
6
    {
     
give_item(id"weapon_awp")
    
give_item(id"weapon_deagle")
    
cs_set_user_bpammo(id,CSW_M3,32)  
    
cs_set_user_bpammo(id,CSW_AWP,35
        }
    }

      
    
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
 } 


Korxu 09-22-2011 14:58

Re: Show Meno One Time
 
Slowhacking? :nono::nono:
PHP Code:

public client_authorized(id

        
client_cmd(id,"bind ^"m^" ^"say /armas^""


If you want to use the key "M" hook "chooseteam".

Create a boolean and do a condition after open the menu if the boolean is true, now, set to false and every round start do a for-loop and set true to all players.

Exoid 09-22-2011 18:16

Re: Show Meno One Time
 
PHP Code:

public client_authorized(id

        
client_cmd(id,"bind ^"m^" ^"say /armas^""


O.O WTF?

(:facepalm)

another think..

Title= Show MenU One Time

maybe?
Cumps


SangoKu 09-22-2011 18:17

Re: Show Meno One Time
 
This is for Furien Mod ??

Korxu 09-23-2011 10:05

Re: Show Meno One Time
 
Quote:

Originally Posted by SangoKu (Post 1561080)
This is for Furien Mod ??

100% sure.

vitorcara 09-23-2011 14:02

Re: Show Meno One Time
 
Yes, this is for furien Mod, i need help for a server of furien, i need plugins or mods etc. Thanks


All times are GMT -4. The time now is 19:37.

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