Raised This Month: $ Target: $400
 0% 

Hud message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
smiley92
Senior Member
Join Date: Jun 2011
Location: Romania
Old 07-15-2012 , 12:42   Hud message
Reply With Quote #1

I don`t found any scripts to no appear message in hud for dead players,how I can do it?I want to appear message just to players alive.

Code:
#include <amxmodx>

static const PLUGIN[ ]= "Details Server";
static const VERSION[ ]= "1.0";
static const AUTHOR[ ]= "Power";

static const g_szB[ ]= "b";


new SyncHudMessage;

public plugin_init( )
{
    register_plugin(PLUGIN, VERSION, AUTHOR);
    
    SyncHudMessage = CreateHudSyncObj( );
    
    set_task( 1.0, "ShowMessage", _, _, _, g_szB );
}

public ShowMessage( )
{
    new Players[32], iNum;
    get_players(Players, iNum, "ch")
    
    new current_map[32]
        get_mapname(current_map, 31)
 
    new timeleft = get_timeleft( )
    
    for( new i = 0; i < iNum; i++ )
    {
        set_hudmessage(255, 255, 255, -1.0, 0.02, 0, 0.0, 1.0, 0.0, 1.0, 3 );
        ShowSyncHudMsg(0, SyncHudMessage, "| Timeleft: %d:%02d | http://www.forum.ro | Harta: %s |", timeleft / 60, timeleft % 60, current_map);
    }
}
smiley92 is offline
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 07-15-2012 , 13:47   Re: Hud message
Reply With Quote #2

PHP Code:
get_players(PlayersiNum"a"
PHP Code:
ShowSyncHudMsg(Players[i], SyncHudMessage"| Timeleft: %d:%02d | http://www.forum.ro | Harta: %s |"timeleft 60timeleft 60current_map); 
EpicMonkey is offline
Old 07-15-2012, 14:08
GhostMan
This message has been deleted by GhostMan. Reason: EpicMonkey already wrote everything. So i'm deleting my post.
smiley92
Senior Member
Join Date: Jun 2011
Location: Romania
Old 07-15-2012 , 14:29   Re: Hud message
Reply With Quote #3

tnx,work fine,but how I can put the message to be with random white?
smiley92 is offline
GhostMan
Senior Member
Join Date: Jun 2012
Old 07-15-2012 , 14:52   Re: Hud message
Reply With Quote #4

Not sure what you ment but if you want random color of hud msg you may use something like this

PHP Code:
new iRed =   random_num(0,255)
new 
iGreen random_num(0,255)
new 
iBlue =  random_num(0,255)


set_hudmessage(iRediGreeniBlue, -1.00.0200.01.00.01.0); 

Last edited by GhostMan; 07-15-2012 at 14:53.
GhostMan is offline
smiley92
Senior Member
Join Date: Jun 2011
Location: Romania
Old 07-15-2012 , 14:54   Re: Hud message
Reply With Quote #5

and with white how I can put?
smiley92 is offline
GhostMan
Senior Member
Join Date: Jun 2012
Old 07-15-2012 , 15:00   Re: Hud message
Reply With Quote #6

I'm not sure that your asking for :O

The white colour of HUD is already set

set_hudmessage(255, 255, 255, -1.0, 0.02, 0, 0.0, 1.0, 0.0, 1.0, 3 )

255, 255, 255 is WHITE colour

Last edited by GhostMan; 07-15-2012 at 15:00.
GhostMan is offline
smiley92
Senior Member
Join Date: Jun 2011
Location: Romania
Old 07-15-2012 , 15:07   Re: Hud message
Reply With Quote #7

is rgb with white,I see now,look photo(normal and with rgb or what is it)
Attached Thumbnails
Click image for larger version

Name:	normal.JPG
Views:	218
Size:	53.2 KB
ID:	106455   Click image for larger version

Name:	rgb.JPG
Views:	241
Size:	49.1 KB
ID:	106456  
smiley92 is offline
vladhks
Junior Member
Join Date: May 2012
Location: VA DAU MUIE
Old 07-16-2012 , 04:15   Re: Hud message
Reply With Quote #8

Code:
#include < amxmodx >

new const PLUGIN[ ] = "Details Server";
new const VERSION[ ] = "1.0";
new const AUTHOR[ ] = "Power";

new const g_szB[ ]= "b";

new SyncHudMessage;

public plugin_init( )
{
    register_plugin( PLUGIN, VERSION, AUTHOR );
    
    SyncHudMessage = CreateHudSyncObj( );
    
    set_task( 1.0, "ShowMessage", _, _, _, g_szB );
}

public ShowMessage( )
{
    static iPlayer;

    static current_map[ 32 ];
    get_mapname( current_map, 31 )
 
    new timeleft = get_timeleft( )

    new szR = random( 255 )
    new szB = random( 255 )
    new szG = random( 255 )
    
    for( iPlayer = 1; iPlayer <= get_maxplayers( ); iPlayer++ )
  {
       if( is_user_alive( iPlayer ) )
     {
        set_hudmessage( szR, szB, szG, -1.0, 0.02, 0, 0.0, 1.0, 0.0, 1.0, 3 );
        ShowSyncHudMsg( 0, SyncHudMessage, "| Timeleft: %d:%02d | http://www.forum.ro | Harta: %s |", timeleft / 60, timeleft % 60, current_map );
      }
   }
}
vladhks is offline
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 14:58.


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