Raised This Month: $ Target: $400
 0% 

register_textmsg


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Administrator
Member
Join Date: Jun 2014
Old 10-23-2014 , 13:09   register_textmsg
Reply With Quote #1

Hello!
Advice please, please write to all players?
PHP Code:
#include <amxmodx>

#define PLUGIN "Switch Fire Hud"
#define VERSION "1.0"
#define AUTHOR "BeasT"

new max_clients

public plugin_init()
{
    
register_plugin PLUGINVERSIONAUTHOR )
    
register_message(get_user_msgid("TextMsg"), "msgTextMsg")
    
max_clients get_maxplayers()
}

public 
msgTextMsg()
{
for(new 
1<= max_clientsi++)
{
    static 
textmsg[22]
    
get_msg_arg_string(2textmsgcharsmax(textmsg))
    
    if(
equal(textmsg"#Switch_To_FullAuto"))
    {
    
set_hudmessage (02550, -1.00.3506.01.50.10.2)
    
show_hudmessage(i"Режим автомата")
    }
    else
    if(
equal(textmsg"#Switch_To_BurstFire"))
    {
    
set_hudmessage (02550, -1.00.3506.01.50.10.2)
    
show_hudmessage(i"Режим тройного выстрела")
    }
    else
    if(
equal(textmsg"#Switch_To_SemiAuto"))
    {
    
set_hudmessage (02550, -1.00.3506.01.50.10.2)
    
show_hudmessage(i"Режим автомата")
    }
}
return 
PLUGIN_HANDLED

Administrator is offline
Administrator
Member
Join Date: Jun 2014
Old 10-23-2014 , 14:01   Re: register_textmsg
Reply With Quote #2

thank, made himself)
Administrator is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-23-2014 , 14:03   Re: register_textmsg
Reply With Quote #3

Don't make a for and use 0 as index. Also, use get_players to loop all players.
__________________
HamletEagle 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 17:34.


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