AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   permanent dhudmessage (https://forums.alliedmods.net/showthread.php?t=164084)

alonelive 08-07-2011 05:31

permanent dhudmessage
 
I have this plugin:

PHP Code:

#include         <amxmodx>
#include         <amxmisc>
#include        <dhudmessage>

#define PLUGIN        "HudStat"
#define AUTHOR        "AloneLive"
#define VERSION        "0.1"

new gMaxPlayers;



public 
plugin_init()
{
    
register_plugin(PLUGIN,VERSION,AUTHOR)
    
    
gMaxPlayers get_maxplayers();
    
set_task(0.1,"hud_hpap""b"
}

public 
hud_hpap() {
    for( new 
id 1id <= gMaxPlayersid++ ) {
        if( 
is_user_alive(id) ) {
            
set_dhudmessage(016000.00.9510.10.10.10.1true);
            
show_dhudmessage(id"  + %i   |   @ %i   |   Фраги:   %i   |   Смерти   %i"get_user_health(id), get_user_armor(id), get_user_frags(id), get_user_deaths(id))
        }
    }


but message flickers sometimes.. How to make the message permanent?
Default hp and armor sprites removed by hud_customizer plugin.

ConnorMcLeod 08-07-2011 06:02

Re: permanent dhudmessage
 
Try :

set_dhudmessage(0, 160, 0, 0.0, 0.95, 0, 0.000001, 0.100001, 0.000001, 0.000001, true);

alonelive 08-07-2011 07:18

Re: permanent dhudmessage
 
Quote:

Originally Posted by ConnorMcLeod (Post 1527436)
Try :

set_dhudmessage(0, 160, 0, 0.0, 0.95, 0, 0.000001, 0.100001, 0.000001, 0.000001, true);

mmm... i think.... what about CPU usage? 0.000001 is too small..
Or Not?

ANTICHRISTUS 08-07-2011 08:32

Re: permanent dhudmessage
 
already done I think, Permanent message.

deadman909 08-07-2011 08:33

Re: permanent dhudmessage
 
Quote:

Originally Posted by ANTICHRISTUS (Post 1527529)
already done I think, Permanent message.

I think that still makes it Flicker though. I used to have same problem that he is having also.

alonelive 08-07-2011 08:46

Re: permanent dhudmessage
 
I need a DHUD MSG
SyncHud msg has too
little SYMBOLS.

ConnorMcLeod 08-07-2011 13:52

Re: permanent dhudmessage
 
Quote:

Originally Posted by alonelive (Post 1527481)
mmm... i think.... what about CPU usage? 0.000001 is too small..
Or Not?

I haven't told you to change task time, btw 0.1 is the minimum.
I think you have missed the 0.100001 hodtime i put.

deadman909 08-08-2011 06:24

Re: permanent dhudmessage
 
Here this should work.
PHP Code:

#include         <amxmodx>
#include         <amxmisc>
#include        <dhudmessage>

#define PLUGIN        "HudStat"
#define AUTHOR        "AloneLive"
#define VERSION        "0.1"

new gMaxPlayers;



public 
plugin_init()
{
    
register_plugin(PLUGIN,VERSION,AUTHOR)
    
    
gMaxPlayers get_maxplayers();
    
set_task(0.1,"hud_hpap""b"
}

public 
hud_hpap() {
    for( new 
id 1id <= gMaxPlayersid++ ) {
        if( 
is_user_alive(id) ) {
            
set_dhudmessage(016000.00.9501.01.0 );
            
show_dhudmessage(id"  + %i   |   @ %i   |   ?????:   %i   |   ??????   %i"get_user_health(id), get_user_armor(id), get_user_frags(id), get_user_deaths(id))
        }
    }




All times are GMT -4. The time now is 03:24.

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