AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   HUD remove/destroy (https://forums.alliedmods.net/showthread.php?t=328043)

Mankled 10-24-2020 00:40

HUD remove/destroy
 
How do I remove/destroy a HUD for every player in the server?

Example:
My server has a plugin where shows a HUD with the best player online in the server.

How HUD looks like:
The Best Player is: Mankled
Kills: 10 | Death: 1

This HUD is showed while playing the entire map (it's never removed/destroyed)

But, the problem comes. When this best player disconnect, it doesnt show the best player anymore, even kills/death, it showed like this.

The Best Player is:
Kills: 0 | Death: 0

So, What I need is to know what function to use, to make it reappear again with new best player, and how to display it to every player in the server. Like an update instantly when the old best player disconnect


**ALL ABOVE IS JUST AN EXAMPLE**

HamletEagle 10-24-2020 02:51

Re: HUD remove/destroy
 
Post the plugin.

Mankled 10-24-2020 12:31

Re: HUD remove/destroy
 
Quote:

Originally Posted by HamletEagle (Post 2722364)
Post the plugin.

As I said above its an example and there's no plugin
, just tell what should I put in client_disconnect to destroy it and make it reappear

r0ma 10-24-2020 12:43

Re: HUD remove/destroy
 
if was an example ¿how you know that problem exists ?
Without code its impossible to fix the problem, its not just put some random code in client_disconnect and ready. Dependt of how the plugin is coded.

The HUD dissapear after x amount of time or when send another hud in the same channel.
You have to make a loop of players, find the best player and make a new hud.

HamletEagle 10-24-2020 12:54

Re: HUD remove/destroy
 
Quote:

Originally Posted by Mankled (Post 2722429)
As I said above its an example and there's no plugin
, just tell what should I put in client_disconnect to destroy it and make it reappear

As I said, post the plugin. No one is going to waste time with an XY problem and there's no generic answer since a hud message is not permanent.

Mankled 11-04-2020 23:27

Re: HUD remove/destroy
 
You'll believe. ..

r0ma 11-05-2020 00:15

Re: HUD remove/destroy
 
maybe the plugin check for new Nemesis/Survivor before the zombie plague make the new one. Try put one task to the function check_again_nsp

Mankled 11-05-2020 01:55

Re: HUD remove/destroy
 
You'll believe...


All times are GMT -4. The time now is 10:15.

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