Raised This Month: $ Target: $400
 0% 

HUD Win Message


Post New Thread Reply   
 
Thread Tools Display Modes
Nibs
Member
Join Date: Apr 2009
Old 04-02-2010 , 09:00   Re: HUD Win Message
Reply With Quote #11

ah nice...

but i was hopeing to replace the current end win message with custom text..

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>
#include <fakemeta_util>

#define PLUGIN "Win Message"
#define VERSION "0.1"
#define AUTHOR "Nibbles"

new cvar_winmessages

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)


    
cvar_winmessages register_cvar("winmessages""1")

}

public 
TextMsg(iMsgidiDestid)
{    
    if(
get_pcvar_num(cvar_winmessages)) {
        static 
message[32]
        
get_msg_arg_string(2messagecharsmax(message))
        
        if(
equal(message"#Terrorists_Win")) set_msg_arg_string(2"Terrorists Rule!")
        else if(
equal(message"#CTs_Win")) set_msg_arg_string(2"Cops Rule!")
        }

what am i doing wrong?

Last edited by Nibs; 04-02-2010 at 09:04.
Nibs is offline
master4life
Senior Member
Join Date: Mar 2006
Location: Germany
Old 04-02-2010 , 10:58   Re: HUD Win Message
Reply With Quote #12

you has forget to Hook "register_message"

PHP Code:
#include < amxmodx >

new g_pCvarEnableg_pCvarTerroristg_pCvarCounter;

public 
plugin_init( ) {
    
register_plugin"PluginName""Version""Author" );
    
    
register_messageget_user_msgid"TextMsg" ), "Message_TextMsg" );
    
    
g_pCvarEnable        register_cvar"amx_end_enable""1" );
    
g_pCvarTerrorist     register_cvar"amx_end_t",     "Terrorists Win" );
    
g_pCvarCounter         register_cvar"amx_end_ct",     "Counter-Terrorists Win" );
}

public 
Message_TextMsg( ) {
    if( !
get_pcvar_numg_pCvarEnable ) ) return;

    new 
szMsg22 ], szTerror32 ], szCounter32 ]; 
    
get_msg_arg_string2szMsgsizeof szMsg );
    
get_pcvar_stringg_pCvarTerroristszTerrorsizeof szTerror );
    
get_pcvar_stringg_pCvarCounterszCountersizeof szCounter );
    
    if( 
equalszMsg"#Terrorists_Win" ) )
        
set_msg_arg_string2szTerror );
    else if( 
equalszMsg"#CTs_Win" ) )
        
set_msg_arg_string2szCounter );

__________________


[img]http://img714.**************/img714/8612/33726.png[/img]
master4life is offline
Send a message via ICQ to master4life Send a message via MSN to master4life Send a message via Skype™ to master4life
akomismo
Member
Join Date: Aug 2012
Old 08-14-2012 , 22:26   Re: HUD Win Message
Reply With Quote #13

how to increase the font size?
akomismo is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-14-2012 , 22:31   Re: HUD Win Message
Reply With Quote #14

You can't
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
bloody806
Member
Join Date: Jun 2012
Location: Czech Republic
Old 01-04-2013 , 18:54   Re: HUD Win Message
Reply With Quote #15

Can someone added any sounds?
Example:
Text message "T win"
Sound "Terorrist Win"

Last edited by bloody806; 01-04-2013 at 18:55.
bloody806 is offline
Send a message via Skype™ to bloody806
enzicz
Junior Member
Join Date: Dec 2012
Old 01-05-2013 , 12:40   Re: HUD Win Message
Reply With Quote #16

I need : "Terrorist win 1/3 rounds, Terrorist win 2/3 rounds, Terrorist win 3 rounds in a row ! Team is changed" and "Counter-Terrorist win ! Team is changed"
enzicz is offline
frOOgy
Senior Member
Join Date: Jul 2014
Old 01-02-2015 , 15:19   Re: HUD Win Message
Reply With Quote #17

Quote:
Originally Posted by Xalus View Post
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Win Msg"
#define VERSION "1.0"
#define AUTHOR "Xalus"


public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_message(get_user_msgid("TextMsg") ,"message_TextMsg")
}

public message_TextMsg( const MsgId, const MsgDest, const MsgEntity )
{	
	static message[32]
	get_msg_arg_string(2, message, charsmax(message))
		
	if(equal(message, "#Terrorists_Win"))
	{
		set_hudmessage( 200, 0, 0, -1.0, 0.40, 4, 3.0, 8.0, 0.0, 0.0, 10);
		show_hudmessage(0, "The Monsters won!")  
	}
	else if(equal(message, "#CTs_Win"))
	{
		set_hudmessage( 0, 0, 200, -1.0, 0.40, 4, 3.0, 8.0, 0.0, 0.0, 10);
		show_hudmessage(0, "The Humans won!") 
	}
}
For this plugin must be 2+ players in server to show hud win message ? I was only in server and after bomb explode, I dodn't see won message...
__________________
Help me in other requests

Change Map System [PLUGIN]

GaG System [PLUGIN] [PLUGIN]
frOOgy is offline
Send a message via Skype™ to frOOgy
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 06:40.


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