How to speed up my plugin?
Hello. How can i write plugins better ?
My questions : Which one i should use ? Only is_user_alive... Code:
if(is_user_alive( id ))Code:
if(is_user_connected( id ) && is_user_alive( id ))If i include <cstrike> for just using "cs_set_user_money" code, does this slow down the server ? Should i make a stock for set_user_money ? Last Question : Is there any tutorial to write better ? |
Re: How to speed up my plugin?
is_user_alive is enough, it includes already a check if user is connected.
Including cstrike is fine. |
Re: How to speed up my plugin?
Has anyone ever done profiling what is the speed difference between those natives?
MAX_SLOTS * TIME_IS_CONNECTED + AVERAGE_PLAYERS_CONNECTED * TIME_IS_ALIVE > MAX_SLOTS * TIME_IS_ALIVE I believe the presentation is pretty much true. Not in empty server though. On the other hand the speed does not matter a thing on an empty server. |
| All times are GMT -4. The time now is 00:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.