| 01-16-2008, 11:42 AM | #1 |
I wanted to make my map flexible in such a way that the host(Red player) may set the max kills possible for the match by chat. example... -setkills 50 that will set the kills needed to win....to 50 kills. Can't find a way to make it though... Can anyone guide me? |
| 01-16-2008, 11:57 AM | #3 |
| 01-16-2008, 12:04 PM | #4 | |
Quote:
uhmm not ... I know that the gui example suck because you can undersand two different way. First number is the begin, and last number is the end of the string. with gui Substring("-setkills",2,5) == "setk" Btw instead of the last number you should use lenght of string |
| 01-16-2008, 12:07 PM | #5 |
Could you provide me with a clear guide? I can't understand. |
| 01-16-2008, 12:09 PM | #6 | |
Quote:
1) - 2) s 3) e 4) t 5) k ... |
| 01-16-2008, 12:15 PM | #7 |
.....................I'm very sorry. Come again? I REAAALLY can't understand. |
| 01-16-2008, 12:43 PM | #8 |
i know my english is very bad but ... see the numbers and you must understand ... |
| 01-16-2008, 01:14 PM | #9 |
Why Substring("-setkills",2,5) will return "setk"?? The uber prwnage answer!!!:
Word: -setkills
^^^^^^^^^
|||||||||
123456789 |
| 01-16-2008, 01:19 PM | #10 |
Ok bud, basically the Substring function grabs stuff by it's number of letters, so you have -setkills which is 9 charectors but you want to grab the number they type after -setkills with a space so the space is another char, you want a two digit number, so that's the 11th and 12th space. Trigger: So you're grabbing the 11th and 12th position of the entered string, which is the 2 number and converting the string into an integer. |
| 01-16-2008, 02:55 PM | #12 |
So since it grabs the 11th and the 12th character, when i say i want the game to end after 5 kills, i have to type -setkills 05? |
| 01-16-2008, 02:59 PM | #13 | |
Quote:
no need, you can say "-setkills 5". Cause when you convert a string to an integer he stop the conversion when a character is not a number (space,nothing, a letter, etc). Btw instead of 12, use String lenght of entered chat string |
| 01-16-2008, 04:06 PM | #15 | |
Quote:
|
