This is a really quick question and i'm wondering if anyone knows the answer here. How do you bind a key to a command that would require quotes in it? Example:
spec_player "Hot Dog"
to bind this you'd need to do
bind "i" "spec_player "Hot Dog""
but the game sees the quotes as ending the first set rather than opening a new set... is there any way around this in the scripting syntax?
This is a really quick question and i'm wondering if anyone knows the answer here. How do you bind a key to a command that would require quotes in it? Example:
[code]spec_player "Hot Dog"[/code]
to bind this you'd need to do
[code]bind "i" "spec_player "Hot Dog""[/code]
but the game sees the quotes as ending the first set rather than opening a new set... is there any way around this in the scripting syntax?
Basically, the command has to be on its own line because of the way quotes work. So essentially it has to be in its own file, and then you exec the file.
Basically, the command has to be on its own line because of the way quotes work. So essentially it has to be in its own file, and then you exec the file.
I thought you could use aliases for this?
I thought you could use aliases for this?
no an alias is the same issue.
alias hot_dog "spec_player "Hot Dog""
still nested quotes. the correct answer is Andkenneth's: make a seperate .cfg file named hot_dog (in this example) with the command
spec_player "Hot Dog"
and then make a bind to exec it ie
bind i "exec hot_dog"
no an alias is the same issue.
[code]alias hot_dog "spec_player "Hot Dog""[/code]
still nested quotes. the correct answer is Andkenneth's: make a seperate .cfg file named hot_dog (in this example) with the command
[code]spec_player "Hot Dog"[/code]
and then make a bind to exec it ie
[code]bind i "exec hot_dog"[/code]
thanks guys for answering this
thanks guys for answering this