strins - Returns string B inserted into string A at position X.

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6384 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Bukz
2011-04-28 02:14:10 +00:00
parent 0c1b63d5da
commit 005b40a48f
3 changed files with 49 additions and 1 deletions
+13
View File
@@ -419,6 +419,19 @@ storesets = [
]
]
// strins - Inserts a string into another string, at position x.
strins = [
if (> $numargs 2) [
if (&& (> $arg3 -1) (< $arg3 (strlen $arg1))) [
tmp_output = ""
loop sil (strlen $arg1) [
if (= $sil $arg3) [ tmp_output = (concatword $tmp_output $arg2 (substr $arg1 $sil 1)) ] [ tmp_output = (concatword $tmp_output (substr $arg1 $sil 1)) ]
]
result $tmp_output
] [ result -1 ]
]
]
// cleanshot - Take a "clean" screenshot with no HUD items.
cs_sets = "clockdisplay crosshairsize hidecompass hideconsole hidectfhud hidedamageindicator hidehudequipment hidehudmsgs hideradar hidespecthud hideteam hidevote hudgun spechudgun showstats"
cs_newsets = "0 0 1 1 1 1 1 1 1 1 1 1 0 0 0"