diff --git a/changelog.txt b/changelog.txt index a4217629..5dc6bf02 100644 --- a/changelog.txt +++ b/changelog.txt @@ -177,9 +177,10 @@ CubeScript [*] looplist - Browses a list executing a body for each element (e.g. looplist "zero one two three" number [ echo $number ]) [*] gametimestart - Returns the time (in milliseconds) when the last map was loaded. [*] mapbackupsonsave - Determines if map backups (.bak) should be created when a map is saved. +[*] isclient - Determines if the client number given is a valid client (player). [*] "Sleeps" can be persistent. (e.g. "Persist" even through map loads - new optional 3rd argument of the /sleep command) [*] Substr crash bug is fixed. Also the command can now use a negative position value. -[*] New stat in (pstat_score) for teamkills. New list is: FLAGS FRAGS DEATHS POINTS TEAM TEAMKILLS NAME // TODO move to compatibility.cfg +[*] New stat in (pstat_score) for teamkills. New list is: FLAGS FRAGS DEATHS POINTS TEAM TEAMKILLS NAME [*] on_quit.cfg for deleting aliases from saved.cfg upon quit. [*] Missing bracket ([], (), etc.) errors now also notify the client of what file the error resides in. [*] New automatically executed scripts folder in the root install directory of AC. @@ -189,6 +190,7 @@ CubeScript [*] The /spectate command can now only be used if connected to a server. [*] The /togglebotview command can no longer be used in arena modes. [*] /keybind bug fix. No more client crash if the argument is an unknown key. +[*] Moved some old/redundant commands to /config/compatibility.cfg. I18n / L10n --------------------- diff --git a/config/compatibility.cfg b/config/compatibility.cfg index e10c9209..a951e20b 100644 --- a/config/compatibility.cfg +++ b/config/compatibility.cfg @@ -3,7 +3,7 @@ curmode = [ result $gamemode ] getclientmode = [ result $gamemode ] -curteam = [ if $numargs [ result (player $arg1 team) ] [ result (player1 team) ] ] +curteam = [ if (&& $numargs (isclient $arg1)) [ result (player $arg1 team) ] [ result (player1 team) ] ] pstat_score = [ if (isclient $arg1) [ diff --git a/config/docs.cfg b/config/docs.cfg index 547f342b..9df00958 100644 --- a/config/docs.cfg +++ b/config/docs.cfg @@ -730,6 +730,10 @@ docident [setbottimeout] [set the length of matches against bots]; docargument [M] [mode] [1 or 2] [0]; docargument [T] [time (in minutes)] [1-60] [0]; docremark [The first argument "M" needs to be 1 for setting the FFA-timeout or 2 for the Team-Mode-timeout.]; +docident [isclient] [Determines if the client number given is a valid client "(player)".]; +docargument [C] [client number [] [0]; +docexample [echo (isclient 0)] [Example output: 1]; +docexample [echo (isclient 32)] [Example output: 0]; docsection [Editing] docident [addpath1way1] []; docident [addpath1way2] []; diff --git a/docs/reference.xml b/docs/reference.xml index d10db47e..ac3becd0 100644 --- a/docs/reference.xml +++ b/docs/reference.xml @@ -2419,6 +2419,9 @@ bind PRINT [ if (strcmp $last_server "") [ remember_server ] Returns 1 if the local player is on the RVSF team, 0 if on CLA. If the player is in SPECTATOR it returns 2. + + + @@ -3144,6 +3147,23 @@ Output: + + + Determines if the client number given is a valid client (player). + + + + Example output: 1 + + + + Example output: 0 + + + + + +