@atambo
your code will also print the echo if map name is: "dust_de_italy"
to check for first chars:
Code:
if (equali(mapname,"cs_",3) || equali(mapname,"de_",3) || equali(mapname,"as_",3) )
{
server_cmd("echo blub do a cmd")
}
get_mapname(mapname2,3) :
will get the first 3 chars of a mapname
but have you ever seen a map called "de_" no its rather "de_dust"
so:
Code:
new mapname[33]
get_mapname(mapname, 32)
PS:
why you want to get mapname and change to that map ?
it is like the command : "restart"
__________________