Raised This Month: $ Target: $400
 0% 

Team Random Class


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MayroN
Senior Member
Join Date: Aug 2017
Location: Kyiv
Old 07-29-2019 , 12:00   Team Random Class
Reply With Quote #1

I noticed that the shotgun menu selection doesn't work with this code.

That is, press B 2 and immediately written in the center of the screen-now this message remains unavailable

What happened?

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_message(get_user_msgid("VGUIMenu"), "message_vgui_menu")
    
register_message(get_user_msgid("ShowMenu"), "message_show_menu")
}
public 
message_vgui_menu(msgiddestid)
{
    switch(
get_msg_arg_int(1))
    {
        case 
2627:
        {
            
set_task(0.0"random_class"id__"a"1)
            return 
PLUGIN_HANDLED
        
}
    }
    return 
PLUGIN_CONTINUE
}
public 
message_show_menu(msgiddestid)
{
    static 
text[6]; get_msg_arg_string(4textcharsmax(text))
    switch(
text[4])
    {
        case 
'r''S':
        {
            
set_task(0.0"random_class"id__"a"1)
            return 
PLUGIN_HANDLED
        
}
    }
    return 
PLUGIN_CONTINUE
}
public 
random_class(id)
{
    switch(
random_num(14))
    {
        case 
1engclient_cmd(id"joinclass""1")
        case 
2engclient_cmd(id"joinclass""2")
        case 
3engclient_cmd(id"joinclass""3")
        case 
4engclient_cmd(id"joinclass""4")
    }

MayroN is offline
Send a message via ICQ to MayroN Send a message via Skype™ to MayroN
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 17:25.


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