Need to see if anyone knows of a good way to split a string into multiple strings delimited by spaces. I need this because it seems that when someone uses a global chat (or just chat, period) through one of the messagemode functions (press t, y, or u while playing), it puts the entire message as one single arg, so you can’t trap the individual words. Example:
When typing from console, args get split up like this:
“say” “!setlevel” “1” “1”
When typing in a message box, args get split up like this:
“say” “!setlevel 1 1”
I need a way to get those values out of that string. Anyone have a function to do so, or a better way to do this?
Thanks for the help!
BTW, I’m sure I could edit the cgame source to change this, but I need this to be server-side only.