Easy question : most efficient way
Hi there, in order to improve my scrpting "skills", i want that all the codes i make use the most officient way to work. I have juste an easy question today, what is the more efficient way to set armor to player ? By efficient, i mean the method that "increases" performance of the server. Like that i can understand a lot of things on these questions :
PHP Code:
PHP Code:
PHP Code:
Thanks in advance for any answer :) |
Re: Easy question : most efficient way
I would go with give_item() or cs_set_user_armor(). That will also set some in-game variables ("user has helmet" etc), while the second one will only set the armor value and update it on HUD. But in this case, the efficiency is probably trivial and not noticeable, but always try to let the game do most of the work for you if possible.
|
Re: Easy question : most efficient way
Ah okay ... I understand, thanks for the answer, got the logic :wink:
Yeah, i Know, but when u have around 100 plugins in your server, u try to get your plugins the most efficient possible ^^ Thanks again. |
| All times are GMT -4. The time now is 15:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.