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

CSGO Map Fog (like Insertion)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iskenderkebab33
Senior Member
Join Date: Jun 2018
Old 01-31-2019 , 18:42   CSGO Map Fog (like Insertion)
Reply With Quote #1

Hello, need a plugin where the Map will be with fog for everyone, like Map: Insertion, Thanks

Last edited by iskenderkebab33; 01-31-2019 at 19:45.
iskenderkebab33 is offline
Nexd
BANNED
Join Date: Dec 2013
Location: Hungary
Old 01-31-2019 , 18:44   Re: CSGO Map Fog
Reply With Quote #2

Hello, try this: https://github.com/Franc1sco/Franug-...g/oscuridad.sp
Nexd is offline
iskenderkebab33
Senior Member
Join Date: Jun 2018
Old 01-31-2019 , 19:01   Re: CSGO Map Fog
Reply With Quote #3

Quote:
Originally Posted by Nexd View Post
Hey, thanks, but... if i turn on, there is a light on the player why?
iskenderkebab33 is offline
Nexd
BANNED
Join Date: Dec 2013
Location: Hungary
Old 01-31-2019 , 19:27   Re: CSGO Map Fog
Reply With Quote #4

PHP Code:
 
#include <sourcemod>
#include <sdktools>

new FogIndex = -1;
new 
Float:mapFogStart 0.0;
new 
Float:mapFogEnd 150.0;
new 
Float:mapFogDensity 0.99;

public 
OnPluginStart()
{
    
RegAdminCmd("sm_fogoff"fogoffADMFLAG_ROOT"");
    
RegAdminCmd("sm_fogon"fogonADMFLAG_ROOT"");
}
public 
OnMapStart()
{
    new 
ent
    
ent FindEntityByClassname(-1"env_fog_controller");
    if (
ent != -1
    {
        
FogIndex ent;
    }
    else
    {
        
FogIndex CreateEntityByName("env_fog_controller");
        
DispatchSpawn(FogIndex);
    }
    
DoFog();
    
AcceptEntityInput(FogIndex"TurnOff");
}

public 
Action:fogoff(clientargs)
{
AcceptEntityInput(FogIndex"TurnOff");}    

public 
Action:fogon(clientargs)
{
AcceptEntityInput(FogIndex"TurnOn");}

DoFog()
{
    if(
FogIndex != -1
    {
        
DispatchKeyValueFloat(FogIndex"fogstart"mapFogStart);
        
DispatchKeyValueFloat(FogIndex"fogend"mapFogEnd);
        
DispatchKeyValueFloat(FogIndex"fogmaxdensity"mapFogDensity);
    }

Try this one, if its not work i’ll try to fix it in the afternoon

Last edited by Nexd; 01-31-2019 at 19:27.
Nexd is offline
iskenderkebab33
Senior Member
Join Date: Jun 2018
Old 01-31-2019 , 19:29   Re: CSGO Map Fog
Reply With Quote #5

Quote:
Originally Posted by Nexd View Post
PHP Code:
 
#include <sourcemod>
#include <sdktools>

new FogIndex = -1;
new 
Float:mapFogStart 0.0;
new 
Float:mapFogEnd 150.0;
new 
Float:mapFogDensity 0.99;

public 
OnPluginStart()
{
    
RegAdminCmd("sm_fogoff"fogoffADMFLAG_ROOT"");
    
RegAdminCmd("sm_fogon"fogonADMFLAG_ROOT"");
}
public 
OnMapStart()
{
    new 
ent
    
ent FindEntityByClassname(-1"env_fog_controller");
    if (
ent != -1
    {
        
FogIndex ent;
    }
    else
    {
        
FogIndex CreateEntityByName("env_fog_controller");
        
DispatchSpawn(FogIndex);
    }
    
DoFog();
    
AcceptEntityInput(FogIndex"TurnOff");
}

public 
Action:fogoff(clientargs)
{
AcceptEntityInput(FogIndex"TurnOff");}    

public 
Action:fogon(clientargs)
{
AcceptEntityInput(FogIndex"TurnOn");}

DoFog()
{
    if(
FogIndex != -1
    {
        
DispatchKeyValueFloat(FogIndex"fogstart"mapFogStart);
        
DispatchKeyValueFloat(FogIndex"fogend"mapFogEnd);
        
DispatchKeyValueFloat(FogIndex"fogmaxdensity"mapFogDensity);
    }

Try this one, if its not work i’ll try to fix it in the afternoon
no, again with light on the player :/
iskenderkebab33 is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 01-31-2019 , 19:30   Re: CSGO Map Fog
Reply With Quote #6

Quote:
Originally Posted by iskenderkebab33 View Post
Hey, thanks, but... if i turn on, there is a light on the player why?
In my plugin you can adjust the vision area in the first values here:
PHP Code:
new Float:mapFogStart 0.0;
new 
Float:mapFogEnd 150.0;
new 
Float:mapFogDensity 0.99
For example if you want a very small vision area and a total darkness then:
PHP Code:
new Float:mapFogStart 0.0;
new 
Float:mapFogEnd 40.0;
new 
Float:mapFogDensity 1.0
And compile here the code https://www.sourcemod.net/compiler.php
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.


Last edited by Franc1sco; 01-31-2019 at 19:32.
Franc1sco is offline
Send a message via MSN to Franc1sco
iskenderkebab33
Senior Member
Join Date: Jun 2018
Old 01-31-2019 , 19:41   Re: CSGO Map Fog
Reply With Quote #7

but is it posible to add fogs like Insertion have some fogs in the map?
iskenderkebab33 is offline
Sw33T3R
AlliedModders Donor
Join Date: Mar 2014
Old 02-01-2019 , 05:10   Re: CSGO Map Fog
Reply With Quote #8

Quote:
Originally Posted by iskenderkebab33 View Post
but is it posible to add fogs like Insertion have some fogs in the map?
Deompile map, check settings in hammer, set values from hammer to plugin
Sw33T3R is offline
Reply



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 21:22.


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