View Single Post
Author Message
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 05-30-2019 , 07:46   set time for menu item
Reply With Quote #1

good day ,

actually i need help regarding setting time for any indiviual item in a menu

like for an example :- this is money menu , i take money once and i have to wait atleast 60 seconds to take again ? i dont have any idea about this so can you help me

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


new keys MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9|MENU_KEY_0

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_menu("Menu 1"keys"func_menu")
        
register_concmd("money_menu""Server_Menu").
}


public 
Server_Menu(id)
{

   static 
menu[650], iLen
   
   iLen 
0
   iLen 
formatex(menu[iLen], charsmax(menu) - iLen"\rmoney-Menu^n^n")
    
    
   
   
iLen += formatex(menu[iLen], charsmax(menu) - iLen"\r1\w. \y Take money \r^n")
   
keys |= MENU_KEY_1
   
 
   show_menu
(idkeysmenu, -1"Menu 1")


 
public 
func_menu(idkey)
{
   switch(
key)
   {
      case 
0cs_set_user_money(id,50000);
   }
   return 
PLUGIN_HANDLED

__________________
SED LYF !!!
SHIELD755 is offline