Raised This Month: $ Target: $400
 0% 

Show a HUD message indefinitely


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
CrAzY MaN
Senior Member
Join Date: Mar 2017
Location: India
Old 05-04-2018 , 01:50   Re: Show a HUD message indefinitely
Reply With Quote #7

Quote:
Originally Posted by TheiOne View Post
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(PLUGINVERSIONAUTHOR)
}

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(2309630, -1.00.001.01.00.10.2)
        
show_dhudmessage(id"ADD TO FAVOURITES : mini.rectergaming.com:27015")
    }
    
    if(
is_user_connected(id) && !is_user_alive(id))
    {
        
set_dhudmessage(17821236, -1.00.2001.01.00.10.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!
__________________
CrAzY MaN is offline
 



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 04:33.


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