There are currently 79 players online.
 
Warsow


 
 

backHow to get server var

Posted by
Post Scroll to bottom
jerms
Member
(727 posts)

Hello,

How can I get vars from the server in AngelScript ?
ie i want to have the actual server value of g_teams_maxplayers

thx
Jerm's

VectorVanDoom
(updated Today 13:37)
(1992 posts)

i would try to creaet a cVar object, the same way its done for a new cvar, but with the name of one that already exists. probably not the brightest idea... worth a shot tho.

VectorVanDoom
(updated Today 13:37)
(1992 posts)

aha, you can just use the variable maxPlayersPerTeam. it should be set, if i interpret the source right ("game/g_ascript.c" also readable here http://www.warsow.net/wiki/ind.....ion_C_file).

jerms
Member
(727 posts)

yes, i found that too but it seems that this variable is not updated when you callvote maxteamplayers during the game.
i'll make a new test,

thx

VectorVanDoom
(updated Today 13:37)
(1992 posts)

what about GS_MaxPlayersInTeam()

jerms
Member
(727 posts)

cVar g_teams_maxplayers( "g_teams_pmaxplayers", "1", CVAR_SERVERINFO|CVAR_ARCHIVE );

this seems to work, thx


Scroll to top



RSSRSSRSSRSS

Copyright © 2013 Chasseur De Bots

Warsow in social media



Warsow is an indie game developed by group of hobbyists. Please consider giving us a small donation: