Raised This Month: $ Target: $400
 0% 

Show a HUD message indefinitely


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
TheiOne
Member
Join Date: Mar 2017
Old 05-11-2018 , 06:03   Re: Show a HUD message indefinitely
Reply With Quote #9

I did it like this:

Code:
public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_message(120, "join_spec");     register_event("DeathMsg", "deathmsg", "a"); } public client_putinserver(id) {     set_task(1.0, "showMessage", id, _, _, "b") } public join_spec(id) {     set_task(1.0, "showMessage", id, _, _, "b") } public deathmsg(id) {     set_task(1.0, "showMessage", id, _, _, "b") } public showMessage(id) {     if(!is_user_connected(id))     {         return;     }     else if(!is_user_alive(id))     {         set_dhudmessage(255, 255, 255, -1.0, 0.70, 0, 1.0, 1.0, 0.1, 0.2)         show_dhudmessage(id, "blah blah blah")     } }

It works, I just wanna know if I could make it better. Would there be any difference if I used a "get user team" in order to show the message when the player joins the SPEC or the current "register_message(120, "join_spec");" is OK ?

And I would appreciate it if someone could briefly explain the difference between hudmessage and dhudmessage. The obvious difference from the API is that dhudmessage has no channel parameter.

Thanks.
TheiOne 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