======================================================================== Stuff which may be helpful on creating own configs ------------------------------------------------------------------------ I. Stats values II. Hud text formating III. StatsMe scripts Expressions ======================================================================== ======================================================================== I. Stats values ------------------------------------------------------------------------ GAME ------------------------------------------------------------------------ p. <- ask for player stats pX. <- X is an index of player, ask for player stats v. <- ask for victim values k. <- ask for killer values b. <- ask for bomb planter values d. <- ask for bomb defuser values tX. <- X is 1 or 2, ask for team values I. <- ask for localinfo value C. <- ask for cvar value R.x <- generate random number from range 0 - x %. <- operate on internal var timeleft <- time remaining currentmap ------------------------------------------------------------------------ PLAYERS ------------------------------------------------------------------------ id <- index of player name <- name of player wonid time <- playing time userid ping <- averange ping v. <- his last victim k. <- his last killer st. <- ask for stats from last action or event w. <- stats from currently used weapon wX. <- X is an index of weapon, ask for stats from pointed weapon gm. <- game stats rd. <- round stats tm. <- player's team I. <- ask for player's setinfo ------------------------------------------------------------------------ TEAMS ------------------------------------------------------------------------ gm. <- game stats rd. <- round stats ------------------------------------------------------------------------ STATS ------------------------------------------------------------------------ name <- name of team, weapon or weapon from which player was killed head <- number of aiming on head stomach leftarm rightarm chest leftleg rightleg shots <- number of shots hits hs <- headshots (kills) kills tks <- teamkilling deaths damage acc <- accuracy eff <- efficiency mkill <- player with most kills mdisr <- most disruptive player macc <- most accurate player ======================================================================== ======================================================================== II. Hud text formating (sm_sayformat cvar) ------------------------------------------------------------------------ Colour red (0-255) Green (0-255) Blue (0-255) Position x (0.00 - 1.00, -1 is center) Position y (0.00 - 1.00, 1.00 is down) Effects (0-2) Fx time (float) Hold time (float) Fade in time (float) Fade out time (float) Channel (diff. channels won't overflow incoming msg.) (i.e. sm_sayformat "0=100=200=-1=0.25=0=6=6=1=1=1") ======================================================================== ======================================================================== III. StatsMe scripts Expressions ------------------------------------------------------------------------ StatsMe have ability to write small scripts which help customize action on various mod events (announcing, scoring). All expressions are put in { }. For example you may request value of hostname by typing {C.hostname} in any of StatsMe command (this may be sm_motd, sm_menu, sm_regster or plain sm_do which behaves like normal command line typed in server console). All events if they are send to specified player can also request values from reciver. For example you may get name of player by typing {p.name}. More info about values you can read in "Stats values" chapter. Beside requesting values, StatsMe allows to make some simple statesments and arithmetical operations. Statesments are also put in { }. The main scheme is { question ? this on "yes" : this on "no" }. So for example {2?dog:cat} will always return dog because 2 is diffrent from 0 or null string. You may also make some comparison in question: For example: {currentmap=de_dust?mp_timelimit 40:mp_timelimit 30} Here is more siutable expresion: mp_timelimit {currentmap=de_dust?40:30} Another example: This server is {C.clanmod_version?using ClanMod $:not using ClanMod} As $ StatsMe will return value of clanmod_version cvar. In conditions we can use: = , <, >, ! (last means: not equals). We can also do some aritmetical operations like +, - , / and * : {2+3} will return 5 {%.me+2} will add 2 to "%.me" var so you can read this value by {%.me} {%.me=hello} will save word hello to {%.me} expression {%.me={{%.dog}+2}} will read value from {%.dog} then add to it 2 and next write it to {%.me} expression Sometimes we don't want to execute line on some condition, so we can use "#skip!" expression as answer. StatsMe will omit that line. For example: {C.mp_timelimit={%.dog}?#skip!} In this example if the mp_timelimit cvar is set to the same value as {%.dog} then line is skipped. ========================================================================