Quote:
Originally Posted by TheiOne
Hello
Is it possible to show a HUD message indefinitely ? I mean like when a player goes to SPEC or dies during the game. I want to show a HUD message till the player joins T or CT or gets respawned in the next round.
I tried hooking DeathMsg and Spectator messages like this:
Code:
register_message(120, "join_spec");
register_event("DeathMsg", "deathmsg", "a");
but the HUD is displayed only for a short time.
|
PHP Code:
#include <amxmodx>
//#include <dhudmessage>
#define PLUGIN "Permenant HUD Message"
#define VERSION "1.0"
#define AUTHOR "CrAzY MaN"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public client_putinserver(id)
{
set_task(1.0, "showMessage", id, _, _, "b")
}
public showMessage(id)
{
if(!is_user_connected(id))
return;
if(is_user_connected(id) && is_user_alive(id))
{
set_dhudmessage(230, 96, 30, -1.0, 0.0, 0, 1.0, 1.0, 0.1, 0.2)
show_dhudmessage(id, "ADD TO FAVOURITES : mini.rectergaming.com:27015")
}
if(is_user_connected(id) && !is_user_alive(id))
{
set_dhudmessage(178, 21, 236, -1.0, 0.20, 0, 1.0, 1.0, 0.1, 0.2)
show_dhudmessage(id, "Buy VIP/Admin?^n Visit rectergaming.com/shop or contact (+91)8530088698")
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang16393\\ f0\\ fs16 \n\\ par }
*/
Try out this, edit message as you want!
__________________