Raised This Month: $32 Target: $400
 8% 

Solved Lets See Can you do it :D?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RockyRock123
Junior Member
Join Date: Jan 2018
Old 01-16-2018 , 05:36   Lets See Can you do it :D?
Reply With Quote #1

I Tried my best to exit menu when users select one of them
(Human Rules , Zombie Rules and Admin Rules )
but could not figure out how will I do it

I need a little help in this scripting

PHP Code:
#include <amxmodx>
#include <fun>
#include <colorchat>
#include <cstrike>
#include <amxmisc>

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

public plugin_init() {
register_plugin(PLUGINVERSIONAUTHOR)
register_clcmd"say /rules""Menu_1" )
set_task(60.0"reklama"0)
}

public 
client_connect(id)
set_task(60.0"reklama"0)

public 
Menu_1id )
{
new 
szMenu menu_create"\yRULES OF BB""Treci_Handle" );
menu_additemszMenu"\yHuman \rRules");
menu_additemszMenu"\yZombie \rRules");
menu_additemszMenu"\yAdmins \rRules");
menu_displayidszMenu );
}
public 
Treci_HandleidszMenuszItem 
{
    if (
szItem == MEXIT_ALL)
    {
        
menu_destroy(szMenu);

        return 
PLUGIN_HANDLED;
    }

menu_displayidszMenu );

switch( 
szItem 

case 
0
{
client_cmd (id"say /hmrules")
}
case 
1:
{
client_cmd (id"say /zmrules")
}
case 
2:
{
client_cmd (id"say /admrules")
}

}
menu_destroyszMenu );
return 
PLUGIN_HANDLED;


Last edited by RockyRock123; 01-16-2018 at 11:50.
RockyRock123 is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 01-16-2018 , 10:08   Re: Lets See Can you do it :D?
Reply With Quote #2

Add this code:
Code:
show_menu(id, 0, "^n", 1)
zmd94 is offline
RockyRock123
Junior Member
Join Date: Jan 2018
Old 01-16-2018 , 10:31   Re: Lets See Can you do it :D?
Reply With Quote #3

can U write the whole script with this code

Last edited by RockyRock123; 01-16-2018 at 10:32.
RockyRock123 is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 01-16-2018 , 11:01   Re: Lets See Can you do it :D?
Reply With Quote #4

For example :

Code:
public menu1( id )
{
    new gMenu = menu_create("\y[\rMenu\y ]\w test", "menu2")
    
    menu_additem(gMenu, "\wRules1", "1")  
    menu_additem(gMenu, "\wRules2", "2")    
    menu_additem(gMenu, "\wRules3", "3")    

    menu_display(id, gMenu, 0)
}

public menu2(id, menu, item)       
{
    if ( item == MENU_EXIT )    
    {
        menu_destroy(menu)       
        return PLUGIN_HANDLED;   
    }
    switch(item)   
    {
        case 0: Rules1(id)
        case 1: Rules2(id)
        case 2: Rules3(id)
    }
    return PLUGIN_HANDLED;  
}

Rules1(id) 
{
    static len; len = 0
    len += formatex(g_motd[len], charsmax(g_motd) - len,"<body bgcolor=#000000><font color=#87cefa><pre>");    
    len += formatex(g_motd[len], charsmax(g_motd) - len, "<font color=^"red^">1.<font color=^"yellow^">[Rules]<font color=^"green^"> ---- YOU RULES<br>")
    show_motd( id, g_motd, "Info" )
}
Rules2(id)  
{
    static len; len = 0
    len += formatex(g_motd[len], charsmax(g_motd) - len,"<body bgcolor=#000000><font color=#87cefa><pre>");    
    len += formatex(g_motd[len], charsmax(g_motd) - len, "<font color=^"red^">1.<font color=^"yellow^">[Rules]<font color=^"green^"> ---- YOU RULES<br>")
    show_motd( id, g_motd, "Info" )
}
Rules3(id) 
{
    static len; len = 0
    len += formatex(g_motd[len], charsmax(g_motd) - len,"<body bgcolor=#000000><font color=#87cefa><pre>");    
    len += formatex(g_motd[len], charsmax(g_motd) - len, "<font color=^"red^">1.<font color=^"yellow^">[Rules]<font color=^"green^"> ---- YOU RULES<br>")
    show_motd( id, g_motd, "Info" )
}

Last edited by raizo11; 01-16-2018 at 11:08.
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
RockyRock123
Junior Member
Join Date: Jan 2018
Old 01-16-2018 , 11:50   Re: Lets See Can you do it :D?
Reply With Quote #5

Thanks Guys that Really helped me can u also look at my other problems I have posted them But stilll no reply on them
RockyRock123 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:02.


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