Hello !
I just want to know, is this a good way to replace the map sky with our sky? [Check Code]
Because when I play on Zombie Escape servers, the game downloads the sky files from the server, and when I join the server, I see another sky and in all the maps, that is, the sky files were downloaded and not used.
I found a way, but it takes time and I have to delete the “skyname” key from the “.ent” file every time I want to add a new map
I just want to know, is this a good way to replace the map sky with our sky? [Check Code]
Because when I play on Zombie Escape servers, the game downloads the sky files from the server, and when I join the server, I see another sky and in all the maps, that is, the sky files were downloaded and not used.
I found a way, but it takes time and I have to delete the “skyname” key from the “.ent” file every time I want to add a new map
Код:
new g_iFwSpawn
public plugin_precache()
{
if (g_szSkyName[0])
{
precache_sky(szSkyName)
//set_cvar_string("sv_skyname", szSkyName)
}
// FakeMeta.
g_iFwSpawn = register_forward(FM_Spawn, "fw_Spawn_Pre")
}
public plugin_init()
{
// Load Plug-In.
register_plugin("[ZE] Effects: Weather", ZE_VERSION, ZE_AUTHORS)
// Disable Hook.
unregister_forward(FM_Spawn, g_iFwSpawn)
// Disable some Cvars.
set_cvar_num("sv_skycolor_r", 0)
set_cvar_num("sv_skycolor_g", 0)
set_cvar_num("sv_skycolor_b", 0)
}
public fw_Spawn_Pre(iEnt)
{
// WorldSpawn?
if (!iEnt)
{
// Set skyname.
DispatchKeyValue(iEnt, "skyname", g_szSkyName)
}
return FMRES_IGNORED
}