es.getmaxplayercount() equivalent
Is there one?
maxClients variable doesn't seem to be exposed anyway to the python side of things.
--
A way to retrieve the player language or client variables (language is stored in cl_language, but in es you could just do es.createplaylist(userid)[userid]['language'])
--
es.stringtable('downloadables', ...) equivalnt
EDIT: Added more stuff I can't seem to find equivalents for
es.getmaxplayercount() equivalent
Looking for certain eventscripts equivalents for porting stuff
Libraries: k2tools
Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)
Plugins (game-specific): None atm
If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython
Plugins (any): GSRPG (soon) | Pretty Status List | MySQLAds (soon)
Plugins (game-specific): None atm
If you happen to find a bug or need help, either post in the release threads or contact me in IRC gamesurge.net:6667 / #sourcepython
Here you go (copied from addons\source-python\_libs\players\entity.py):
Syntax: Select all
GameEngine.GetClientConVarValue(self.info, 'cl_language')
-Tuck
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Hey guys,
The following should work:
L'In20Cible
The following should work:
Syntax: Select all
from Entity import Entities
from entities.helpers import index_from_edict
def get_max_players():
for edict in Entities('cs_team_manager'):
if edict.GetPropInt('CTeam.m_iTeamNum'):
continue
return index_from_edict(edict) - 1
L'In20Cible
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 63 guests