@Siska1 your sky is not supported somehow, this stock collects by default all existing names, this way we avoid repetitions, you can call it in "plugin_int" or in "plugin_precache"
PHP Code:
stock set_skyName()
{
new const szSkyNames[][] =
{
//valve
"2desert",
"alien1", "alien2", "alien3",
"cliff",
"desert",
"dusk",
"morning",
"neb1", "neb6", "neb7",
"night",
"space",
"xen8", "xen9", "xen10",
//cstrkie
"backalley",
"badlands",
"blue",
"city",
"cx",
"de_storm",
"Des",
"doom1",
"DrkG",
"forest",
"green",
"grnplsnt",
"hav",
"morningdew", //maxsize = 10->getSky=11
"office",
"snow",
"tornsky",
"TrainYard",
"tsccity_"
}
new num = random_num(0, charsmax(szSkyNames))
new getSky[11]; get_cvar_string("sv_skyname", getSky, charsmax(getSky))
if(equal(getSky, szSkyNames[num]))
{
set_skyName()
return
}
set_cvar_string("sv_skyname", szSkyNames[num])
}
__________________