Forum
CS2D Scripts How to get gamemodeHow to get gamemode
10 replies 1
1
parse("sv_gm value")
0 - standart
1- Deathmatch (I think xD)
2 - Team Deathmatch
3 - Construction
4 - Zombies !
Rainoth has written
0 - standart
1- Deathmatch (I think xD)
2 - Team Deathmatch
3 - Construction
4 - Zombies !
1
parse("sv_gm value")
0 - standart
1- Deathmatch (I think xD)
2 - Team Deathmatch
3 - Construction
4 - Zombies !
i don't want parse, i want get.
Use game
1
gameMode=game("sv_gm")
1
game(sv_gm)
DC has written
He asked how to get it, not how to set it
Use game
Note that the returned value will be a string
Use game
1
gameMode=game("sv_gm")
Thanks DC. i searched game but i can't find "sv_gm" in this list.
version: the current game version
dedicated: boolean, true if server is dedicated, false otherwise
phase: game phase, 0 for freezetime, 1 for actual game
round: current round
score_t: score of terrorists (rounds won)
score_ct: score of counter-terrorists (rounds won)
winrow_t: rounds won in a row by terrorists
winrow_ct: rounds won in a row by counter-terrorists
nextmap: the next map in the map cycle (sys/mapcycle.cfg)
port: UDP port used by the server
bombplanted: boolean, true if bomb is currently planted and blinking, false otherwise
Thanks
Quote
You can use ALL settings like sv_name to get their current value as string(!).
DC has written
You should read the entire description
Quote
You can use ALL settings like sv_name to get their current value as string(!).
oops i didn't see
one question more :
1
game("sv_gm")
what is return value ?
0
1
2
3
4
Or
"Standard"
"Deathmatch"
....
..
?_
edited 1×, last 07.04.13 07:23:43 pm
Also standard is with a d at the end.
Conscience has written
Go and see what it returns. Most likely 0-4 seeing as you set it with these values.
Also standard is with a d at the end.
Also standard is with a d at the end.
i tested. it returns Number string value.
"0"
"1"
"2"
"3"
"4"
edited 1×, last 07.04.13 07:24:22 pm
"0","1","2" etc.
(this command returns everything as string when used with settings)
1