Raised This Month: $ Target: $400
 0% 

Strange Hudmessage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Paladinrocker
Junior Member
Join Date: Jan 2007
Old 02-18-2007 , 01:36   Strange Hudmessage
Reply With Quote #1

I made a simple hlss blocking plugin, and it works (Thanks to some code I found here by Hawk), but unfortuantely my hud message doesn't work. Here's my code:

Code:
public verifyHlss(id, cvar[], value[])
{
    if(equal(value, "1"))
    {
        new playerName[32];
        get_user_name(id, playerName, 31);
    
        switch(g_blockhlssToggle)
        {
            case 1:
            {
                set_hudmessage(255, 0, 0, 0.20, 0.33, 0, 6.0, 3.0);
                show_hudmessage(0, "%s was gagged for using HLSS", playerName);
                set_speak(id, SPEAK_MUTED);
                client_cmd(id, "voice_inputfromfile 0");
                console_print(0, "[AMXX] Client ^"%s^" gagged for use of HLSS", playerName);
            }
            case 2:
            {
                set_hudmessage(255, 0, 0, 0.20, 0.33, 0, 6.0, 3.0);
                show_hudmessage(0, "%s was kicked for using HLSS", playerName);
                client_cmd(id, "voice_inputfromfile 0");
                server_cmd("kick #%i ^"The use of HLSS is prohibited^"", get_user_userid(id));
                console_print(0, "[AMXX] Client ^"%s^" kicked for use of HLSS", playerName);
            }
        }
    }
}
It's just a little code snippet where it verifies if a user has the cvar "voice_inputfromfile" on or off, and disciplines them according to a setting, but the hud message only displays on the gag, not on the kick. Not sure why, but I feel retarded over this. Thanks a lot guys if you can help.
Paladinrocker is offline
stupok
Veteran Member
Join Date: Feb 2006
Old 02-18-2007 , 02:08   Re: Strange Hudmessage
Reply With Quote #2

They look the same to me. Try using -1 as the channel for the hudmessage.

For example,
Code:
set_hudmessage(255, 0, 0, 0.20, 0.33, 0, 6.0, 3.0, 0.1, 0.2, -1);
set_hudmessage()
stupok is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-18-2007 , 02:50   Re: Strange Hudmessage
Reply With Quote #3

My guess is that you have a plugin that shows HUD messages on client disconnect, and that message is overriding the HUD channel that you are using.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Paladinrocker
Junior Member
Join Date: Jan 2007
Old 02-18-2007 , 11:57   Re: Strange Hudmessage
Reply With Quote #4

OH! That makes sense Avalance, thanks a lot.
Paladinrocker is offline
Reply


Thread Tools
Display Modes

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 00:42.


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