Raised This Month: $ Target: $400
 0% 

TextMsg remplace !


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 12-30-2015 , 03:11   TextMsg remplace !
Reply With Quote #1

Hello I want replacement TextMsg with Hud_Message !
but ignorant of the way so any one can help me ?
PHP Code:
public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_message(get_user_msgid("TextMsg"),    "msgTextMsg");
}

public 
msgTextMsg(id)
{
    static 
textmsg[22];
    
get_msg_arg_string(2textmsg21);
    
    if(
equal(textmsg"#Vote"))
    {
            
set_hudmessage(25525500.480.1200.1 10.00.04)
             
show_hudmessage(0"Test Message!")
   
    }
    
    return 
PLUGIN_HANDLED

__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 12-30-2015 , 09:26   Re: TextMsg remplace !
Reply With Quote #2

Try this:
Code:
#include <amxmodx> #define PLUGIN "TextMsg Replacer" #define VERSION "1.0" #define AUTHOR "abdobiskra" public plugin_init() {     register_plugin( PLUGIN, VERSION, AUTHOR )     register_message( get_user_msgid( "TextMsg" ), "msgTextMsg" ) } public msgTextMsg( msgid, dest, id ) {     static text_msg[ 64 ];     get_msg_arg_string( 2, text_msg, charsmax(text_msg) );     set_hudmessage( 255, 255, 0, 0.48, 0.12, 0, 0.1, 10.0, 0.04 )     show_hudmessage( id, "%s", text_msg )         return PLUGIN_HANDLED }

See also: TextMsg arguments?, Block MSG and https://www.google.com.br/search?q=TextMsg site:forums.alliedmods.net.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 12-31-2015 at 07:13. Reason: better information
addons_zz is offline
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 12-30-2015 , 16:33   Re: TextMsg remplace !
Reply With Quote #3

addons_zz
Thx !

but another print work !
ex:
Unknown command !
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 12-30-2015 , 19:06   Re: TextMsg remplace !
Reply With Quote #4

Quote:
Originally Posted by abdobiskra View Post
but another print work !
ex:
Unknown command !
Sorry, I do not understand what do you mean.
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective

Last edited by addons_zz; 12-30-2015 at 19:08.
addons_zz is offline
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 12-31-2015 , 00:40   Re: TextMsg remplace !
Reply With Quote #5

__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 12-31-2015 , 03:37   Re: TextMsg remplace !
Reply With Quote #6

Quote:
Originally Posted by abdobiskra View Post
Do you want that the message Unknown command, do not appear upper and appear as a HUD?

Or is it appearing at the top and at the HUD at the same time, and you want that it do not appear as HUD?
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 12-31-2015 , 06:22   Re: TextMsg remplace !
Reply With Quote #7

i want block Unknown command
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 12-31-2015 , 07:20   Re: TextMsg remplace !
Reply With Quote #8

Quote:
Originally Posted by abdobiskra View Post
i want block Unknown command
How to do an Unknown command be showed?

Code:
#include <amxmodx> #define PLUGIN "TextMsg Replacer" #define VERSION "1.0" #define AUTHOR "abdobiskra" public plugin_init() {     register_plugin( PLUGIN, VERSION, AUTHOR )     register_message( get_user_msgid( "TextMsg" ), "msgTextMsg" ) } public msgTextMsg( msgid, dest, id ) {     static text_msg[ 64 ];     get_msg_arg_string( 2, text_msg, charsmax(text_msg) );     if( !equal( text_msg ,"#Game_unknown_command" ) )     {         set_hudmessage( 255, 255, 0, 0.48, 0.12, 0, 0.1, 10.0, 0.04 )         show_hudmessage( id, "%s", text_msg )         return PLUGIN_HANDLED     }     return PLUGIN_CONTINUE }
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz is offline
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 12-31-2015 , 08:33   Re: TextMsg remplace !
Reply With Quote #9

I tried it in advance but did not work
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
addons_zz
Veteran Member
Join Date: Aug 2015
Location: Dreams, zz
Old 12-31-2015 , 09:33   Re: TextMsg remplace !
Reply With Quote #10

Quote:
Originally Posted by addons_zz View Post
How to do an Unknown command be showed?
Answer my question, if you still want my help.

Quote:
Originally Posted by abdobiskra View Post
I tried it in advance but did not work
But for now, try this:
Code:
#include <amxmodx> #define PLUGIN "TextMsg Replacer" #define VERSION "1.0" #define AUTHOR "abdobiskra" public plugin_init() {     register_plugin( PLUGIN, VERSION, AUTHOR )     register_message( get_user_msgid( "TextMsg" ), "msgTextMsg" ) } public msgTextMsg( msgid, dest, id ) {     static text_msg[ 64 ];     get_msg_arg_string( 2, text_msg, charsmax(text_msg) );     if( !equali( text_msg, "Unknown command", 13 ) )     {         set_hudmessage( 255, 255, 0, 0.48, 0.12, 0, 0.1, 10.0, 0.04 )         show_hudmessage( id, "%s", text_msg )     }     return PLUGIN_HANDLED }
__________________
Plugin: Sublime Text - ITE , Galileo
Multi-Mod: Manager / Plugin / Server

Support me on Patreon, Ko-fi, Liberapay or Open Collective
addons_zz 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:28.


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