AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hud Message Help (https://forums.alliedmods.net/showthread.php?t=162031)

deadman909 07-14-2011 03:28

Hud Message Help
 
I was going through the pages and found this plugin. I was wondering if someone can change it a bit for me. I want the hud message to appear without a Player having to say a command so meaning they are automatic.

Also I can you guys set the position to appear like in the image I am showing.

I want it to have 4 different hud messages with different times

1st Hud = Welcome to our server: Visit us @ www.mysite.com
Want it to appear for only 30 to 45 seconds when a player connects.

2nd Hud = Server IP: 123.3451.3232:27015
Want it to appear like every 1 to 3 minutes.

3rd Hud = Server IP: 123.3451.3232:27015
Want it to appear when player is dead and disappear till hes back alive.

4th Hud = Current Player's Money: $12,000
Want it to show under the 3rd hud when player is dead. I want it to show the current players money amount of the person the dead player is specting.

Code:

#include <amxmodx>
#include <dhudmessage>

public plugin_init()
{
    register_plugin( "Test", "", "" );
    register_clcmd( "say /test", "ClientCommand_Test" );
}

public ClientCommand_Test( client )
{
    set_dhudmessage( 0, 160, 0, -1.0, 0.25, 2, 6.0, 3.0, 0.1, 1.5 );
    show_dhudmessage( client, "Welcome, Gordon Freeman." );
   
}

http://i51.tinypic.com/fvz22v.jpg

liinuus 07-14-2011 05:01

Re: Hud Message Help
 
change the dhud message and call an task when theyre authorised, use ham functions for death and spawn. also isnt dhud messages allways there untill they get replaced by another dhud?

deadman909 07-14-2011 06:08

Re: Hud Message Help
 
So just istead of register cldmd put set task

Code:

#include <amxmodx>
#include <dhudmessage>

public plugin_init()
{
    register_plugin( "Test", "", "" );
    set_task(15.0,"ClientCommand_Test",0,"",0,"a",1);
}

public ClientCommand_Test( client )
{
    set_dhudmessage( 0, 160, 0, -1.0, 0.25, 2, 6.0, 3.0, 0.1, 1.5 );
    show_dhudmessage( client, "Welcome, Gordon Freeman." );
   
}


liinuus 07-14-2011 07:43

Re: Hud Message Help
 
Quote:

Originally Posted by deadman909 (Post 1510432)
So just istead of register cldmd put set task

Code:

#include <amxmodx>
#include <dhudmessage>

public plugin_init()
{
    register_plugin( "Test", "", "" );
    set_task(15.0,"ClientCommand_Test",0,"",0,"a",1);
}

public ClientCommand_Test( client )
{
    set_dhudmessage( 0, 160, 0, -1.0, 0.25, 2, 6.0, 3.0, 0.1, 1.5 );
    show_dhudmessage( client, "Welcome, Gordon Freeman." );
   
}


if youre gonna have the task in ur plugin init u will need to loop through all players in the ClientCommand_Test function

xPaw 07-14-2011 08:18

Re: Hud Message Help
 
http://forums.alliedmods.net/showthread.php?p=236886

deadman909 07-14-2011 18:11

Re: Hud Message Help
 
Quote:

Originally Posted by xPaw (Post 1510506)

This is for messages though not huds.


All times are GMT -4. The time now is 00:52.

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