Raised This Month: $51 Target: $400
 12% 

ML Help!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
enjoi.
Veteran Member
Join Date: Mar 2011
Old 10-03-2011 , 16:38   ML Help!
Reply With Quote #1

I don't know if this is the right section or not but I feel like an idiot right now. I just started coding and me and my friend are making a plugin. We both just started coding so we don't know how to make A ML. Can anybody help? So far its in Polish. This is our code thanks for people who help. will be included in the plugin! Edit: If somebody can translate it into like English or something it would be great so we can work off that!

PHP Code:
#include <amxmodx> 

#define PLUGIN "Menu" 
#define VERSION "1.5" 
#define AUTHOR "Redux + -dINk^1d" 

public plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR
    
register_clcmd("say /menu","mymenu"); 




public 
mymenu(id

    new 
MyMenu=menu_create("\wServer Menu [\rDeathrun\w]""cbMyMenu"); 
    
    
menu_additem(MyMenu"Change Server"); //item=0 
    
menu_additem(MyMenu"Deathrun Shop"); //item=1 
    
menu_additem(MyMenu"Turn off CT Visibility"); //item=2 
    
menu_additem(MyMenu"Deathrun Points"); //item=3 
    
menu_additem(MyMenu"Admin Menu", .paccess=ADMIN_BAN); //item=4 
    
menu_additem(MyMenu"Turn Off/On Round Sound"); //item=5 
    
menu_additem(MyMenu"Close"); //item=6
    
    
    
menu_setprop(MyMenuMPROP_EXITNAME"Close") ; 
    
menu_setprop(MyMenuMPROP_EXITMEXIT_ALL); 
    
menu_setprop(MyMenuMPROP_NUMBER_COLOR"\y"); 
    
    
    
menu_display(idMyMenu,0); 
    return 
PLUGIN_HANDLED


public 
cbMyMenu(idmenuitem

    switch(
item
    { 
        case 
0
        { 
            
client_cmd(id"say /server"); 
            
        } 
        case 
1
        { 
            
client_cmd(id"say /drshop"); 
            
        } 
        case 
2
        { 
            
client_cmd(id"say /invis"); 
            
        } 
        case 
3
        { 
            
client_cmd(id"say /points"); 
            
        } 
        case 
4
        { 
            
client_cmd(id"amxmodmenu"); 
            
        } 
        case 
5
        { 
            
client_cmd(id"say /roundsound"); 
            
        } 
        
    } 
    
menu_destroy(menu); 
    return 
PLUGIN_HANDLED


/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ 
__________________
Block Maker v6.0 []
Point Slay v3.0 []
Contact [ PM ]

Last edited by enjoi.; 10-06-2011 at 07:36.
enjoi. is offline
MmikiM
Senior Member
Join Date: Nov 2006
Location: Poland
Old 10-06-2011 , 07:24   Re: ML Help!
Reply With Quote #2

PHP Code:
#include <amxmodx>  

#define PLUGIN "Menu"  
#define VERSION "1.4"  
#define AUTHOR "Redux + -dINk^1d"  

public plugin_init()  
{  
    
register_plugin(PLUGINVERSIONAUTHOR)  
    
register_clcmd("say /menu","mymenu");  
}  



public 
mymenu(id)  
{  
    new 
MyMenu=menu_create("\wServer Menu [\rDeathrun\w]""cbMyMenu");  

    
menu_additem(MyMenu"Change server"); //item=0  
    
menu_additem(MyMenu"DR Shop"); //item=1  
    
menu_additem(MyMenu"Turn off CT visibility"); //item=2  
    
menu_additem(MyMenu"Points"); //item=3  
    
menu_additem(MyMenu"Admin Menu", .paccess=ADMIN_BAN); //item=4  
    
menu_additem(MyMenu"Turn ON/OFF RS"); //item=5  

    
menu_setprop(MyMenuMPROP_EXITNAME"Exit") ;  
    
menu_setprop(MyMenuMPROP_EXITMEXIT_ALL);  
    
menu_setprop(MyMenuMPROP_NUMBER_COLOR"\y");  


    
menu_display(idMyMenu,0);  
    return 
PLUGIN_HANDLED;  
}  

public 
cbMyMenu(idmenuitem)  
{  
    switch(
item)  
    {  
        case 
0:  
        {  
            
client_cmd(id"say /server");  

        }  
        case 
1:  
        {  
            
client_cmd(id"say /drshop");  

        }  
        case 
2:  
        {  
            
client_cmd(id"say /invis");  

        }  
        case 
3:  
        {  
            
client_cmd(id"say /mypoints");  

        }  
        case 
4:  
        {  
            
client_cmd(id"amxmodmenu");  

        }  
        case 
5:  
        {  
            
client_cmd(id"say /roundsound");  

        }  

    }  
    
menu_destroy(menu);  
    return 
PLUGIN_HANDLED;  

Here you go. I'm not sure with one line but I thinks it's okay.
__________________


Projects:
Zombie Elite - Technical: 100% Looking for models and sounds...
CS:Source Zombie -
Work in progress...
MmikiM is offline
enjoi.
Veteran Member
Join Date: Mar 2011
Old 10-06-2011 , 07:36   Re: ML Help!
Reply With Quote #3

I know. Heres my englsih code. How do I make A ML for it so people with denmark languages and others can read it if there not english?

Updated Above.
__________________
Block Maker v6.0 []
Point Slay v3.0 []
Contact [ PM ]
enjoi. is offline
avril-lavigne
Banned
Join Date: Apr 2009
Old 10-13-2011 , 06:38   Re: ML Help!
Reply With Quote #4

look for standart plugin like admin.amxx and look inside


register_dictionary("admin.txt")


console_print(id, "[AMXX] %L", LANG_SERVER, "LOADED_ADMIN");

where %L = is your multilang string from admin.txt

LOADED_ADMIN = Админ загружен
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc
avril-lavigne is offline
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 09:33.


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