get_flags
Question: Which is faster and less cpu usage.
Doing PHP Code:
|
Re: get_flags
It's surely a trivial optimization.
Using the first one will avoid the situation of adding flags while the player is ingame and appear as the player doesn't have the needed flag. |
Re: get_flags
If another plugin modifies the users flags after you have saved them, then you will start to encounter problems. Unless you don't care about that, best to stick to calling get_user_flags when it is needed
|
Re: get_flags
There is no other plugin that modifies, for me if its needed I can add the user to vipAccess[id] = true;
I'm just wondering if its faster if there is 16 players and in each player spawn its asked get_user_flags(id) and then menu does the same check and more other things. For me, lets say 100x get_user_flags(id) OR 100x vipAccess[id] ==true ? like I mean, example in 1st post |
Re: get_flags
Quote:
|
Re: get_flags
Checking a variable/array value is definitely better than calling a native function.
You can do this, too: PHP Code:
PHP Code:
|
| All times are GMT -4. The time now is 10:14. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.