Configstring: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
general info about configstrings |
||
| Line 2: | Line 2: | ||
Configstrings can be accessed with [[Lua_Mod_API#configstrings|et.trap_GetConfigstring and et.trap_SetConfigstring]] and the [[Lua_Mod_API#string_utility_functions|String utility functions]] | Configstrings can be accessed with [[Lua_Mod_API#configstrings|et.trap_GetConfigstring and et.trap_SetConfigstring]] and the [[Lua_Mod_API#string_utility_functions|String utility functions]] | ||
==What are Configstrings== | |||
* Configstrings are strings that are set on the server, and automatically sent to each client. | |||
* Configstrings are often, but not always, in the from of an infostring (a backslash delimited set of key\value pairs) | |||
* Each configstring is identified by a number, which is usually given refered to by a name #defined in the ET gamecode. | |||
* A group of related configstrings (such as CS_PLAYERS) usually only have a symbolic name for the first value, with a number (entity number in the case of CS_PLAYERS) added to to get a particular value. | |||
* Most configstrings have a specific meaning to the gamecode. You can use the etmain SDK find out what they do, but beware that etpro does not do things exactly the same as etmain. | |||
* A list of configstring numbers and names can be found in [http://www.collectivecomputing.com/~reed/et/lua/etconst.lua etconst.lua] | |||
==User Configstring== | ==User Configstring== | ||
Revision as of 22:19, 28 August 2006
Configstrings can be accessed with et.trap_GetConfigstring and et.trap_SetConfigstring and the String utility functions
What are Configstrings
- Configstrings are strings that are set on the server, and automatically sent to each client.
- Configstrings are often, but not always, in the from of an infostring (a backslash delimited set of key\value pairs)
- Each configstring is identified by a number, which is usually given refered to by a name #defined in the ET gamecode.
- A group of related configstrings (such as CS_PLAYERS) usually only have a symbolic name for the first value, with a number (entity number in the case of CS_PLAYERS) added to to get a particular value.
- Most configstrings have a specific meaning to the gamecode. You can use the etmain SDK find out what they do, but beware that etpro does not do things exactly the same as etmain.
- A list of configstring numbers and names can be found in etconst.lua
User Configstring
A user Configstring gets written in the log file with a line starting with UserInfoChanged which mustn't be mistaken for one with Userinfo.
To access a user's Configstring you can't just use et.trap_GetConfigstring(slotNumber) but must use et.trap_GetConfigstring(et.CS_PLAYERS + slotNumber)
|
Notes
et.CS_PLAYERS = 689 for those of you that don't use etconst.lua
Source: http://bani.anime.net/banimod/forums/viewtopic.php?t=5412