AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   stops all hud (https://forums.alliedmods.net/showthread.php?t=106393)

mAr7obg 10-14-2009 16:39

stops all hud
 
Ъan you do when a player enters the server to its menu that pops asking him if he wants to see hud messages? to have 2 options /
1. HUD to see all messages
2. not to see all messages Hood

Alucard^ 10-15-2009 02:34

Re: stops all hud
 
Give more description about "HUD Msg"...

You means the radar, armor, health, money, croshair, etc?

Like this plugin:

http://forums.alliedmods.net/showthread.php?t=76947

?

mAr7obg 10-15-2009 03:58

Re: stops all hud
 
i need to dissable/enable show_hudmessages

One 10-15-2009 04:23

Re: stops all hud
 
you could spam you'r hud :P
Code:

set_task(0.1,"spam")
public spam()
{
set_hudmessage(Xxx
show_hudmessage(0,"      ")
}


Exolent[jNr] 10-15-2009 12:16

Re: stops all hud
 
You can use this, but it won't block HUD messages from other plugins.

Code:
#include < amxmodx > #include < amxmisc > new bool:g_bBlockHUD[ 33 ]; public plugin_init( ) {     register_plugin( "Block HUD Messages", "0.0.1", "Exolent" );     register_message( TE_TEXTMESSAGE, "MessageTextMessage" ); } public MessageTextMessage( iMsgId, iDest, client ) {     return g_bBlockHUD[ client ] ? PLUGIN_HANDLED : PLUGIN_CONTINUE; }

mAr7obg 10-15-2009 12:59

Re: stops all hud
 
Quote:

Originally Posted by Exolent[jNr] (Post 962819)
You can use this, but it won't block HUD messages from other plugins.

Code:
#include < amxmodx > #include < amxmisc > new bool:g_bBlockHUD[ 33 ]; public plugin_init( ) {     register_plugin( "Block HUD Messages", "0.0.1", "Exolent" );     register_message( TE_TEXTMESSAGE, "MessageTextMessage" ); } public MessageTextMessage( iMsgId, iDest, client ) {     return g_bBlockHUD[ client ] ? PLUGIN_HANDLED : PLUGIN_CONTINUE; }

Thanks , but i search to block from other plugins.Is this possible?

Exolent[jNr] 10-15-2009 13:04

Re: stops all hud
 
I think you would have to use One's method, even though it is very inefficient.

mAr7obg 10-15-2009 13:50

Re: stops all hud
 
is this only way?

vitorrd 10-15-2009 14:22

Re: stops all hud
 
Unless there is a cross-plugin way of doing what Exolent said, yes, it's probably the only way.

Exolent[jNr] 10-15-2009 14:34

Re: stops all hud
 
If you could change the code in the amxmodx module for the show_hudmessage function to work like emessage( ) does, then you could hook them with my plugin.
That would be the only way possible with my plugin, unless you wanted to edit all plugins showing hudmessages to use a native from my plugin to check if player had the hud enabled.
The problem with the second way is that you can't use 0 for the index in show_hudmessage. You would have to loop through all players.


All times are GMT -4. The time now is 22:32.

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