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.