It would be cool to have a library from which you can import constants from, to make the code more readable.
For example you could have CS_TEAM_CT = 3, or you could have all the flags in that lib.
Information lib with constants in it
Indeed, would make things a lot easier. Then again, you can write it in a simple .py file by yourself too. Also, there seems to be a small discussion about team's already, you should check the page 2 atleast.
Mh, another approach is to do this with ini files. Though py should just work as well.
Though I think there should be more general constants like TEAM_UNASSIGNED TEAM_SPECTATOR TEAM_1 TEAM_2 or so to make things compatible. Actually something else to discuss is whether to make constants really constant, so you can't change their values (by accident/easily).
Though I think there should be more general constants like TEAM_UNASSIGNED TEAM_SPECTATOR TEAM_1 TEAM_2 or so to make things compatible. Actually something else to discuss is whether to make constants really constant, so you can't change their values (by accident/easily).
There actually is a .ini file for this... but IDK what it is being used for, or how you can use it easily (without the need to ConfigObj it yourself) in scripts: http://code.google.com/p/source-python/source/browse/addons/source-python/_libs/_data/players/teams/csgo.ini
Who is online
Users browsing this forum: No registered users and 101 guests