AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Trash this (https://forums.alliedmods.net/showthread.php?t=57787)

maplebest 07-11-2007 10:34

Trash this
 
Trash this

flyeni6 07-11-2007 11:59

Re: Knife Mod...
 
try the new menu system, its easier. this should work.
(sorry its not indented. i have to go to school)
PHP Code:

#include <amxmodx>
 
public plugin_init()
 {
    
//..stuff for your plugin
    
register_clcmd"say /test","AwesomeMenu")
 }
 public 
AwesomeMenu(id)
 {
    new 
menu menu_create("\rLook at this awesome Menu!:""menu_handler")
// if there is more than 8 "menu_additem", then a new page optioin wll create its self 
    
menu_additem(menu"\wI'm Selection #1""1"0)
    
menu_additem(menu"\wI'm Selection #2""2"0)
    
menu_additem(menu"\wI'm Selection #3""3",0)
    
menu_additem(menu"\wI'm Selection #4""4"0)
    
menu_additem(menu"\wI'm Selection #5""5"0)
    
menu_additem(menu"\wI'm Selection #6""6"0)
    
menu_additem(menu"\wI'm Selection #7""7"0)
    
menu_additem(menu"\wI'm Selection #8""8"0)
    
menu_additem(menu"\wI'm Selection #9""9"0)
    
menu_additem(menu"\wI'm Selection #10""10"0)
    
menu_additem(menu"\wI'm Selection #11""11"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:{
            
client_print(idprint_chat"Hooray! You selected the Awesome 1st Selection")
            
menu_destroy(menu)
            return 
PLUGIN_HANDLED
        
}
        case 
2:{
            
client_print(idprint_chat"OH NO! You selected the Awesome 2nd Selection! BEWARE!")
        }
        case 
3:{
            
client_print(idprint_chat"You have selected the Awesome 3th Selection! Hail Teh Bail!")
            
menu_destroy(menu)
            return 
PLUGIN_HANDLED
        
}
 case 
4:{
            
client_print(idprint_chat"OH NO! You selected the Awesome 4th Selection! BEWARE!")
        }
 case 
5:{
            
client_print(idprint_chat"OH NO! You selected the Awesome 5th Selection! BEWARE!")
        }
 case 
6:{
            
client_print(idprint_chat"OH NO! You selected the Awesome 6th Selection! BEWARE!")
        }
 case 
7:{
            
client_print(idprint_chat"OH NO! You selected the Awesome 7th Selection! BEWARE!")
        }
 case 
8:{
            
client_print(idprint_chat"OH NO! You selected the Awesome 8th Selection! BEWARE!")
        }
 case 
9:{
            
client_print(idprint_chat"OH NO! You selected the Awesome 9th Selection! BEWARE!")
        }
 case 
10:{
            
client_print(idprint_chat"OH NO! You selected the Awesome 10th Selection! BEWARE!")
        }
 case 
11:{
            
client_print(idprint_chat"OH NO! You selected the Awesome 11th Selection! BEWARE!")
        }
    }
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
 




All times are GMT -4. The time now is 21:29.

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