Change map sky

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
28
Реакции
0
Good evening, how can I change the sky on the maps?

Код:
#include <amxmodx>

public plugin_init()
{
    register_plugin("Skyname Forcer", "1.0", "YourName")
}

public plugin_cfg()
{
    server_cmd("sv_skyname MilkWorldBK");
}
I have this but every time I change the map it is placed default to desert
 
Сообщения
130
Реакции
7
sv_skyname ""

This is the first time I've heard that you need a plugin to change your sky
 
Сообщения
18
Реакции
0
Use this if you want custom sky.
Код:
new const g_Precache[][] = {
    "gfx/env/MilkWorldup.tga",
    "gfx/env/MilkWorldrt.tga",
    "gfx/env/MilkWorldlf.tga",
    "gfx/env/MilkWorldft.tga",
    "gfx/env/MilkWorlddn.tga",
    "gfx/env/MilkWorldbk.tga" 
};
public plugin_precache() {
for(new i = 0; i < sizeof g_Precache; i++)  
        precache_generic(g_Precache[i]);
set_cvar_string("sv_skyname", "MilkWorld");
};
 
Последнее редактирование:
Сообщения
166
Реакции
15
Помог
5 раз(а)
this stock collects all the existing names by default, in this way we avoid repetition, you can call it in "plugin_int" or in "plugin_precache"

Код:
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])
}
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу