Raised This Month: $12 Target: $400
 3% 

[ALL] Real Sky Changer


Post New Thread Reply   
 
Thread Tools Display Modes
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 01-14-2021 , 05:23   Re: [CSS|ZPS|CSGO] Real Sky Changer
Reply With Quote #31

Quote:
Originally Posted by DiNaMiK.OTP View Post
This plugin does not work in the new designed maps (dust2, inferno, nuke)
The plugin doesn't work on Source2 game, seems like are 8 materials in source2 and only one message to send them, i shall look, tho it works fine on CS:S , L4D, L4D2, ZPS
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
sekac
Senior Member
Join Date: Nov 2016
Old 10-20-2021 , 15:18   Re: [CSS|ZPS|CSGO] Real Sky Changer
Reply With Quote #32

For csgo you need to disable the 3d skybox first.

Code:
public void OnClientPostAdminCheck(int client)
{
    if (!IsFakeClient(client)) 
    {
        CreateTimer(1.0, Timer_DisableSkybox, client);
    }
}

public Action Timer_DisableSkybox(Handle timer, int client)
{
	if (!IsClientInGame(client))
        return Plugin_Stop;
	
	SetEntProp(client, Prop_Send, "m_skybox3d.area", 255);
	
	return Plugin_Continue;
}
sekac is offline
BiohazardLucifer
Member
Join Date: Dec 2015
Old 07-11-2022 , 09:13   Re: [CSS|ZPS|CSGO] Real Sky Changer
Reply With Quote #33

Can you fix this for csgo? it s not working for all the map
BiohazardLucifer is offline
Send a message via Yahoo to BiohazardLucifer Send a message via Skype™ to BiohazardLucifer
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 07-12-2022 , 13:08   Re: [CSS|ZPS|CSGO] Real Sky Changer
Reply With Quote #34

v1.4 beta test only , unstable
PHP Code:
/*
    
    -------------------------------------------------------------
        Cusom SKY Changer
        v1.4 by CryWolf
    
    - Provides realtime sky change features
    - Auto precache the needed sky texture (bouth .VMT and .VTF files)
    - Simple code
    - Extra config features (cfg/sourcemod/skychanger.cfg)
    - disabled 3d skybox thanks sekac
    - removed index
    - new download files syntax
    - removed new syntax plugin erros on compile
    -------------------------------------------------------------
*/


#include < sourcemod >
#include < sdktools >
#include < clientprefs >

#pragma semicolon 1


// Plugin Information
#define PLUGIN_VERSION    "1.4 beta"

// pCvarS:
new Handle:cvarEnabled;
new 
Handle:cvarSkybox;


public 
Plugin:myinfo =
{
    
name "Sky Changer",
    
author "CryWolf",
    
description "Provides Sky changer feature",
    
version PLUGIN_VERSION,
    
url "https://forums.alliedmods.net/showthread.php?t=258603"
};

public 
OnPluginStart()
{
    
cvarEnabled CreateConVar "sm_custom_sky""1.0""Skybox plugin on / off" );
    
cvarSkybox  CreateConVar "sm_skybox_name""deadend_hdr""Skybox texture name" );
    
    
// Load configuration file
    
AutoExecConfig(true"skychanger");
    
}

public 
OnMapStart()
{
    if ( 
GetConVarBool (cvarEnabled))
    {
        
PrecacheSkyBoxTexture ( );
        
ChangeSkyboxTexture ( );
    }
}

public 
PrecacheSkyBoxTexture ( ) 
{
    
decl String:newskybox 32 ];
    
GetConVarString cvarSkyboxnewskyboxsizeof newskybox ) );
    
    
Handle kv;
    static 
char path[PLATFORM_MAX_PATH];
    
FileToKeyValues(kvpath);
    
    static 
char suffix[][] =
    {
        
"bk",
        
"Bk",
        
"dn",
        
"Dn",
        
"ft",
        
"Ft",
        
"lf",
        
"Lf",
        
"rt",
        
"Rt",
        
"up",
        
"Up",
    };
    
    
char sPath[64];
    
char name[32];
    
char buffer[PLATFORM_MAX_PATH];
    
    
//Get path & name
    
KvGetString(kv"path"sPathsizeof(sPath));
    
KvGetString(kv"newskybox"namesizeof(name));
    
    
//Loop through suffixes and add to downloads table
    
for (int i 0sizeof(suffix);i++)
    {
        
FormatEx(buffersizeof(buffer), "materials/skybox/%s%s.vtf"sPathsuffix[i]);
        if(
FileExists(bufferfalse)) AddFileToDownloadsTable(buffer);
        
        
FormatEx(buffersizeof(buffer), "materials/skybox/%s%s.vmt"sPathsuffix[i]);
        if(
FileExists(bufferfalse)) AddFileToDownloadsTable(buffer);
    }
    
    
CloseHandle(kv);
    
}

public 
ChangeSkyboxTexture()
{
    if ( 
GetConVarBool (cvarEnabled))
    {
        
decl String:newskybox  32 ];
        
GetConVarString(cvarSkyboxnewskyboxsizeof newskybox ));
        
        
// If there is a convar set, change the skybox to it
        
if ( strcmp newskybox""false ) !=)
        {
            
// PrintToServer ( "[CSC] Changing the Skybox to %s", newskybox );
            
DispatchKeyValue 0"skyname"newskybox );
        }
    }
}

public 
void OnClientPostAdminCheck(int client)
{
    if (!
IsFakeClient(client)) 
    {
        
CreateTimer(1.0Timer_DisableSkyboxclient);
    }
}

public 
Action Timer_DisableSkybox(Handle timerint client)
{
    if (!
IsClientInGame(client))
        return 
Plugin_Stop;
    
    
SetEntProp(clientProp_Send"m_skybox3d.area"255);
    
    return 
Plugin_Continue;

Test it at first, and then ill upload on main page, but first whanna add external .ini file per map ex
Code:
mapname skybox
mapname skybox
mapname default
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers

Last edited by CryWolf; 07-12-2022 at 13:12.
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
BiohazardLucifer
Member
Join Date: Dec 2015
Old 07-12-2022 , 18:21   Re: [CSS|ZPS|CSGO] Real Sky Changer
Reply With Quote #35

i test, it s coming like blue sky.

(poate n-am facut ceva bine, ramane cer albastru pe mapele de tip "dust2,infero,nuke" iar pe celalate mape "de_lake etc" ramane normal. Chiar daca pui cvar "!cvar sm_skybox_name")
BiohazardLucifer is offline
Send a message via Yahoo to BiohazardLucifer Send a message via Skype™ to BiohazardLucifer
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 07-13-2022 , 13:25   Re: [CSS|ZPS|CSGO] Real Sky Changer
Reply With Quote #36

This should work
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers

Last edited by CryWolf; 07-14-2022 at 04:11. Reason: first post.
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
BiohazardLucifer
Member
Join Date: Dec 2015
Old 07-13-2022 , 16:50   Re: [CSS|ZPS|CSGO] Real Sky Changer
Reply With Quote #37

i test, nothing, no error nothing but the sky it s like default sky on the map.( i try sm_skybox_name blood1_, it s working cvar but nothing happend...
BiohazardLucifer is offline
Send a message via Yahoo to BiohazardLucifer Send a message via Skype™ to BiohazardLucifer
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 07-14-2022 , 02:27   Re: [CSS|ZPS|CSGO] Real Sky Changer
Reply With Quote #38

Quote:
Originally Posted by BiohazardLucifer View Post
i test, nothing, no error nothing but the sky it s like default sky on the map.( i try sm_skybox_name blood1_, it s working cvar but nothing happend...
I've edited the post above, dont know what to do against cs:go 3d sky's. but try it.

Are the files being downloaded ?
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers

Last edited by CryWolf; 07-14-2022 at 02:32.
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
CryWolf
Veteran Member
Join Date: Jul 2008
Location: Romania
Old 07-14-2022 , 04:11   Re: [ALL] Real Sky Changer
Reply With Quote #39

UPDATE!
PHP Code:
    Custom Sky Changer
        v1.6.2
    
Removed compile errors
    
updated new syntax
    
Set the sky to server and clients
    
Simplyfied download method.
    - 
Removed unnecessary code and checks
    
    to 
do:
    * 
Fix a way of disabling CS:GO 3D sky without affecting the sky cvar and enable 2d skybox
    
Add external .INI file 
Ill fiind a way to get bypass CS:GO's 3d skybox, and then ill release a version with , external .ini file as per map config.
TEST
CS:GO https://steamuserimages-a.akamaihd.n...67E55DE59364F/
ZPS: https://steamuserimages-a.akamaihd.n...C0EE42E12008C/
L4D: https://steamcommunity.com/sharedfil...?id=2835008885
__________________
I dont walk trough this world with fear in my heart.
www.dark-arena.com L4D, CS1.6, CZ Servers

Last edited by CryWolf; 07-14-2022 at 04:16.
CryWolf is offline
Send a message via MSN to CryWolf Send a message via Yahoo to CryWolf
BiohazardLucifer
Member
Join Date: Dec 2015
Old 07-14-2022 , 04:13   Re: [ALL] Real Sky Changer
Reply With Quote #40

thx, test workin, but no for the map sky 3d
BiohazardLucifer is offline
Send a message via Yahoo to BiohazardLucifer Send a message via Skype™ to BiohazardLucifer
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:09.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode