Raised This Month: $ Target: $400
 0% 

New at coding


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Ludacriss
BANNED
Join Date: Aug 2010
Old 08-05-2010 , 13:18   New at coding
Reply With Quote #1

Hello!

I got a zombie mod server and i am working on a menu so the human can choose between 6 models.

Can someone fix it and so only humans can open it not zombies and so the models work and the print_chat works.

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fun>

#define PLUGIN    "Model Changer"
#define AUTHOR    "Ludacriss"
#define VERSION    "1.0"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /menu","PlayerMenu");
}
public 
PlayerMenu(id)
{
    new 
menu menu_create("\r Choose your player model:""menu_handler");
    
menu_additem(menu"\yZoey""\r1"0);
    
menu_additem(menu"\yFrancis""\r2"0);
    
menu_additem(menu"\yBill""\r3"0);
    
menu_additem(menu"\yLouis""\r4"0);
    
menu_additem(menu"\yEllis""\r5"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"You selected Zoey as your player model!");
            
menu_destroy(menu);
            return 
PLUGIN_HANDLED;
        }
        case 
2:
        {
            
client_print(idprint_chat"You selected Francis as your player model!");
            
menu_destroy(menu);
            return 
PLUGIN_HANDLED;
        }
        case 
3:
        {
            
client_print(idprint_chat"You selected Bill as your player model!");
            
menu_destroy(menu);
            return 
PLUGIN_HANDLED;
        }
        case 
4:
        {
            
client_print(idprint_chat"You selected Louis as your player model!");
            
menu_destroy(menu);
            return 
PLUGIN_HANDLED;
        }
        case 
5:
        {
            
client_print(idprint_chat"You selected Ellis as your player model!");
            
menu_destroy(menu);
            return 
PLUGIN_HANDLED;
        }
    }
    
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;


Last edited by Ludacriss; 08-05-2010 at 14:17.
Ludacriss is offline
 


Thread Tools
Display Modes

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 00:17.


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