Basically this stock returns a value depending on it searches. So we are looking for a value of a map, lets say: get_value_from_data("de_dust")
The stock will quickly look up at the file & get it's value, only if the map is on the file.
Code:
new map_int = get_value_from_data("de_dust2")
if (map_int == 1)
server_print("playing on dust 2")
else if (map_int == 0)
server_print("map not listed on the file")
map_data.dat examples
"de_dust2" 1
"de_dust" 2
"de_inferno" 3
"cs_assault" 4
You can get rid of add_map. You can manually configure them on the file.
Reminder: Don't set a map's value 0, the 0 is the default value of an undefined integer. The stock get's an number from a map, if the map doesn't exists then the integer won't have a call. (you can get rid of it if you set it on "-1". ReturnValue = -1;
__________________