A way to update hud_list
Hi modders, i need to check what a better solution to update an hud_list..
Actually i have this method: PHP Code:
PHP Code:
It is sane and secure to replace all commands with register_forward(FM_Think,"HudList"); ? I think have other ways to do this, when a forward called or player make some action. Thanks. |
Re: A way to update hud_list
Please give more details. What you want to update in the list ? Players online ?
|
Re: A way to update hud_list
Quote:
The code is ok, it is only the method to update the hudlist. |
Re: A way to update hud_list
Then, update it when someone got ready.
|
Re: A way to update hud_list
Generally, you should only update only when absolutely needed. If you are updating based on connected players then you update when someone connect or disconnects. If you are updating alive status, update when someone spawns or dies. Same logic applies here.
|
Re: A way to update hud_list
Quote:
Thanks. |
Re: A way to update hud_list
Problem doing this, if this is for a public server, is that you can't control which additional plugins are installed on server, so you can't prevent plugins from overwriting your messages.
That's why it is better to loop the message with like a 1.0 interval, it won't affect server performances in any significant way and you can make sure message is displayed. |
Re: A way to update hud_list
Quote:
But in my server i only was using one plugin to send hudmessages (Sorry, i not using any amxx default plugins.) And in instead of using an set_task it have some other event to do this? like register_forward(FM_Think) or FM_ClientThink? Thanks. |
Re: A way to update hud_list
Think forward is the worst way to show a hudmessage.
|
Re: A way to update hud_list
Quote:
Im talking about FM_Think called by server (I guess) , not FM_ClientThink |
| All times are GMT -4. The time now is 18:46. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.