AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Really Need Some Help... (https://forums.alliedmods.net/showthread.php?t=58022)

shine771 07-17-2007 07:34

Really Need Some Help...
 
I want to create FOG for CS 1.6. Just want to all be dark and foggy. Want to scare the hell out of players XD. Ok know for CS 1.6 - FOG. I searched forum and i found this:
Code:

    weather_ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "env_fog"))
    DispatchKeyValue(weather_ent,"density","0.001")
    DispatchKeyValue(weather_ent,"rendercolor","116 137 147")

What exactly i should do with this code. I know thats a n00by question. But i really dont know. I try'd this.
Code:

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <engine>

#define PLUGIN "Fog"
#define VERSION "1.0"
#define AUTHOR "Sh!nE*"

new weather_ent

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
   
    set_task(1.0,"start_fog")
}

public start_fog()
{
    weather_ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "env_fog"))
    DispatchKeyValue(weather_ent,"density","0.001")
    DispatchKeyValue(weather_ent,"rendercolor","116 137 147")
}

RESULT: NOTHING

I want to make a good fog. Not millions of sprites... It'll LAG my server. I hope you can help. I know for CS - good FOG - Impossible. But i saw that post. And i got a hope...
Thanks.

Alka 07-17-2007 08:59

Re: Really Need Some Help...
 
You must create fog in plugin_precache() !
And change this
Code:

DispatchKeyValue(weather_ent,"density","0.001")
to
Code:

DispatchKeyValue(weather_ent,"density","0.002")

shine771 07-17-2007 08:59

Re: Really Need Some Help...
 
Sorry for Double Post
Ok i figured out... I only need to place the entity anywhere in map. In i got fog for cs 1.6... I just need to know how to create that entity... and set those key values...

shine771 07-17-2007 09:01

Re: Really Need Some Help...
 
Big BIG THANKS +Karma


All times are GMT -4. The time now is 21:28.

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