[SNIPPET/CODE] How to properly check Team score.
Using the next code example i'm going to show you a good way to get team scores, based on my tests, this is working even if is planting bomb/ hostage save, etc ...
First, create 2 new global variables, inside of them will store the actual score of teams: PHP Code:
Register these events in the plugin_init: PHP Code:
PHP Code:
PHP Code:
PHP Code:
Code:
|
Re: [SNIPPET/CODE] How to properly check Team score.
PHP Code:
|
Re: [SNIPPET/CODE] How to properly check Team score.
Ohh my god.. isnt there a native for such already?
|
Re: [SNIPPET/CODE] How to properly check Team score.
In 1.8.3, since it has gamedata natives check m_iNumTerroristWins and m_iNumCTWins, no new native needed. Or you can use orpheu/okapi and check this members.
|
Re: [SNIPPET/CODE] How to properly check Team score.
Quote:
|
Re: [SNIPPET/CODE] How to properly check Team score.
It does work, but has no effect. You don't need those 2 lines.
|
Re: [SNIPPET/CODE] How to properly check Team score.
Quote:
topic edited. |
Re: [SNIPPET/CODE] How to properly check Team score.
You are trying to empty something that's already empty. Not a big deal, anyway.
|
Re: [SNIPPET/CODE] How to properly check Team score.
Quote:
Also, Fakemeta didn't add get_gamerules_* natives for retrieving members values from the gamerules class? Or it has another purpose? |
Re: [SNIPPET/CODE] How to properly check Team score.
Quote:
About get_gamerules ... That's in 1.8.3, i show a way for 1.8.2 or less. |
All times are GMT -4. The time now is 18:26. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.