EventScripts Forums
Mattie's EventScripts and Source Forums
Mattie recommends...
Premier Sponsor:Platinum Sponsor:
 
Script Categories
addon (49) admin (269) admins (14) advert (15) adverts (19) afk (15) alerts (12) ammo (23) anti (15) auth (16) automatic (12) awp (23) ban (18) ba_jail (17) bhop (19) block (19) bomb (40) bonus (23) bot (24) bot-management (19) bots (17) bunnyhop (11) Buy (21) cash (65) chat (57) cheat (11) clan (16) classes (22) color (21) colors (18) command (20) commands (18) config (22) connect (42) CS:S (16) css (2507) Damage (35) database (11) dead (15) death (19) deathmatch (70) deathrun (12) disconnect (18) Dissolve (11) dm (20) dod:s (11) dods (389) easy (17) effects (120) English (15) entity (21) es_tools (12) Eventscript (12) flashbang (25) français (99) french (36) fun (288) funny (16) Gabeee (11) gameplay (174) give (16) gravity (11) grenade (25) grenades (29) gun (14) GunGame (26) GunGame5 (11) guns (17) Hack (15) headshot (32) health (55) hegrenade (13) hl2dm (332) HP (13) info (48) information (16) jail (26) jailbreak (11) join (23) jump (12) kick (23) kill (44) kills (22) knife (57) leveling (36) management (14) mani (15) map (25) map-management (27) maps (15) match (17) menu (106) message (20) messaging (52) mod (109) model (14) models (32) money (42) motd (13) music (29) mute (18) nades (18) name (13) noblock (35) player (40) player-management (31) player-tracking (28) popup (56) props (23) protection (27) punishment (50) python (63) quake (18) radio (21) random (36) rank (35) rates (16) rcon (13) realism (21) respawn (61) restrict (36) round (20) rpg (24) rules (42) say (11) scout (19) Script (20) script-helper (25) scriptpack (33) sdk (151) server (44) server-tools (42) shop (12) silly (31) simple (27) skins (25) slay (13) soccer (11) sound (45) sounds (92) spawn (63) speed (25) statistics (13) stats (48) STEAMID (23) Superhero (13) surf (31) Team (25) team-balance (14) teleport (12) text (14) TF2 (143) time (17) timer (14) tools (15) tracers (17) triggers (11) uedi (18) uses_auth (18) utility (11) vip (12) vote (36) voting (22) war (20) wcs (24) wcs:Python (32) weapon (77) weapons (114) web (14) welcome (12) zm (24) zombie (90) zombiemod (51) zombies (11)
Script Authors
*XYZ*SaYnt (12) .:MiB:. (11) .eMko* (6) 101satoon101 (10) 3R10N (24) 4u571n91 (5) 7355608 (9) Absolute (8) Ace Rimmer (40) adminc (5) Adz (8) AgathaKnuppelkuh (8) aidden (8) ajax (5) ak_47 (6) Al3c Tr3v3lyan (6) allstareng (5) ashbash1987 (9) ATAMAH (7) aznone (5) B00M (5) BackRaw (41) BFH_RedBull (8) bigfabi (7) Bioko (7) Blade (10) bladesback (13) bobdole (11) bodzsar1 (8) bonbon (36) Brainsucker (30) cagemonkey (8) carbon-14 (10) CaskioUTF (5) cbirou (15) ChaCaLz2psy4 (5) CharlesT (5) Chrisber (5) chrismrulz (9) Chun (6) cladiron (10) clipz934 (8) Colster (21) Cookieman8 (7) craziest (10) DanielB (19) Darkness123 (8) Dave (9) dbozan99 (7) deathx9 (5) Deathyy (16) dhack (16) Di[M]aN (12) DoCky (27) Don (15) dordtcore (8) DragonFreddo (8) Drassil (5) Einlanzers (42) EmbouT (10) emilplov (7) Errant (10) Eun (6) Fantole (9) Franc1sco (9) freddukes (18) Frequency (6) Fulmine (5) GAMEREN2 (8) german9114 (13) GODJonez (38) GoodfellaDeal (5) Hansi (6) HitThePipe (7) HOLLDIDAY (9) Icetouch (6) ichthys (25) infamous1 (9) Jeff91 (45) JoeyT2006 (30) Juba_PornBorn (12) jxl180 (10) KDBFame (6) L'In20Cible (7) Largo Usagi (10) Lobe (11) loKkdoKk (7) lolo-le-haricot (7) LosNir (5) Lumpi@Work (9) M4rc3L-XCN (7) macshot (6) Matth (6) Mattie (20) MBchrono (15) McFly (20) Medda (5) Memphis-84 (10) Messiah93 (12) Mickyy (5) micmacx (6) Mitchell (5) Mordavolt (7) MrScriptaz (5) mryoung (6) Nicolous (26) ojii (31) Omega_K2 (8) Owned|Myself (8) P3N (7) pand3mic (5) parsimba (5) Pascal257 (9) PatPeter (7) PDrop (10) Phaedrus (18) PhantOm Fury (7) phoenix131 (9) pinkyyy -.- (5) pitbull0993 (7) randomknifer (9) Ratzee (6) ReaCtioN2oo9 (6) Rennnyyy (17) revolutionfighters (6) RideGuy (12) Rio (9) Roeliekt (6) runamagic (13) sandking220 (6) Sarcasm_Poisoning (10) saRs| Johnny-5 (13) Schubaal (10) sea212 (5) sega74rus (7) sgt.angel (6) sicilia (5) sicman_adrian (22) skillz92 (7) sn4k3 (18) snake38 (10) sonicsight (7) spoonman184 (8) stabby (22) stas (22) Strontium Dog (30) SumGuy14 (25) SuperDave (45) surfteam (5) TaCo (5) TanaToS (17) Tealk (6) teowow (16) TheCheeTaH (20) TheDonFather (5) theresthatguy (6) Tiny Tod (7) Totyahun (9) uedi (38) Undead (25) usernamesaretaken (15) Warren (13) westham (6) WhiteAvenger (7) Wonder (14) X-Mania (5) XE_ManUp (13) xfalcon61 (5) zSweetXz (5) [Cs]Lord_Inferno2 (11) [NATO]Hunter (28) ||Wolf|| (10)
Search

Post new topic Reply to topic
Author Message
User avatar
Reader
Profile

Posts: 113
Location:
Chicago, IL
 
New postPosted: 2007-05-26, 2:55 am 
   Post subject: Magic Ninja's CSS Flare v 2.2

CSS Flare v 2.2

This addon creates a flare like light at the explosion of a flash bang. Also has the ability to not flash your teammates.

Screen Shots:
    Before Flare:
    Image

    After Flare:
    Image

    Blue Flare:
    Image

    Blue Flare with CT:
    Image

    Blue Flares:
    Image

    Blue Flare with Smoke Grenade:
    Image

    Flare type 1 on left, 2 on right:
    Image


Features:
    Set Friendly Flashes off
    Set length of flare
    Set size, color, of light and glow
    Random Colors
    Set type of flare: just light, and physics

Requirements:
    ES 1.5+
    ES_Tools
      For est_setentname If you really don't want to use est change the code where "est_setentname" is used to just "setentname" that is the es version however it doesn't work as well as the est version.

Installation:
    Download modevents.res.zip
    extract the modevents.res into you cstrike/resorce folder

    If you already have a file there, edit the flashbang_detonate to
    Code:
       "flashbang_detonate"
       {
          "userid"   "short"
          "x"      "float"
          "y"      "float"
          "z"      "float"
       }


    download the es_mn_flare.txt
    save es_mn_flare.txt to cstrike/addons/eventscripts/mn_flare

    Add to your autoexec.cfg
    Code:
    es_load mn_flare

    Restart your server

Configuration:
    Edit the config block of the es_mn_flare.txt
    ES:
      block config
      {
        //************************************************************
        // FLARES
        //********
        // Time in seconds you want each flare to last
        es_xset mn_flare_time 30
        //
        //  Type of flare
        //  1 = Just light, 2 = Physics Flare
        es_xset mn_flare_type 2
       
        //************************************************************
        // FRIENDLY FLARE
        //****************
        // Turns off team flashing, so u can only blind the other team and create a flare
        // 1 = no team flashing, 0 = off
        es_xset mn_ff 1
       
        //************************************************************
        // RANDOM COLORING
        //*****************
        //  0 = off, 1 = Find seperate random colors for glow and light, 2 = Find the same random color for glow and light
        es_xset mn_flare_randcolor 2

        //************************************************************
        // GLOW SETTINGS
        //***************
        //  Color in Red Green Blue
        //  Default is 255 for all being white
        es_xset mn_flare_glow_color_red 255
        es_xset mn_flare_glow_color_green 255
        es_xset mn_flare_glow_color_blue 255
        //
        //  Vertical Size
        //  Default is 16
        es_xset mn_flare_glow_vsize 16
        //
        // Horizontal Size  
        // Default is 16
        es_xset mn_flare_glow_hsize 16
        //
        //  Minimum Distance
        //  The distance at which this effect will be fully translucent.
        //  Default is 2000
        es_xset mn_flare_glow_mindist 2000
        //
        //  Maximum Distance
        //  The distance at which this effect will be at full intensity.
        // Default is 2
        es_xset mn_flare_glow_maxdist 2
       
        //************************************************************
        // LIGHT SETTINGS
        //****************
        //  Color in Red Green Blue
        //  Default is 255 for all being white
        es_xset mn_flare_light_color_red 255
        es_xset mn_flare_light_color_green 255
        es_xset mn_flare_light_color_blue 255
        //
        //  Brightness 0-10, 0 = none, 10 = max bright
        //  Default is 5
        es_xset mn_flare_light_bright 5
        //
        //  Light Distance
        //  Default is 256
        es_xset mn_flare_light_dist 256
        //
        //  LightSport Radius
        //  Default is 96
        es_xset mn_flare_light_spot 96
        //
        //  Style
        //  A preset pattern of diverse flicker effects
        //  0 = Normal, 1 = Flicker A, 2 = Slow strong pulse, 3 = Candle A, 4 = Fast strobe,
        //  5 = Gentle pulse, 6 = Flicker B, 7 = Candle B, 8 = Candle C, 9 = Slow strobe,
        //  10 = Fluorescent flicker, 11 = Slow pulse noblack
        //  Default is 6
        es_xset mn_flare_light_style 6
      }

History:
    V2.2 -
      Fixed:
      Cleaned up the code some more
      Did more testing, found out that b/c of limits beyond ES lights may break.
    V2.1 -
      Fixed:
      Typeo in setting when blind
    V2.0 -
      Fixed:
      No clean up commands or timed
      Round clean up stuff
      Deleting the Flare
      Typo on random colors
      Formated it for optimization
    V1.1 -
      Added:
      Random colors
      Cleanup via Time, Say Command for admins, and Round end
      Fixed:
      Glow size typo
    V1.0 -
      Initial Release:

Known issues:
    Lights don't always turn off:
      I know this is lame, but try reconnecting to the server. If that doesn't fix it, restart the round. If that doesn't work either, then reload the map if it really bugs you.
    Lights shine through walls:
      Whatever the max distance is set to is the max distance through walls as well Its just how vlave's dynamic lights work.
    You will see in console:
      DataTable warning: (class light_dynamic): Out-of-range value (-89.000000) in SendPropFloat 'm_InnerAngle', clamping.

_________________
Image


Last edited by M4j1kN1nj4 on 2007-05-27, 3:11 am, edited 13 times in total.




User avatar
Professor
Professor
Profile

Posts: 1877
Location:
Erionville
 
New postPosted: 2007-05-26, 7:12 am 

that looks cool gonna try it out

_________________
Image

Nacht der lebenden Toten


User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 6679
Location:
The Valley of The Dolls
 
New postPosted: 2007-05-26, 8:43 am 

Very nice M4j1kN1nj4!

_________________
The day Microsoft starts making vacuums is the day they make something that doesn't suck!
----------------------------------------------------------------------------
"Government is not the solution to our problems, Government IS the problem."
-Ronald Reagan
----------------------------------------------------------------------------
"Be who you are and say what you mean because those who matter don't mind and those who mind don't matter."
...-Dr. Seuss
----------------------------------------------------------------------------


User avatar
Historian
Historian
Profile

Posts: 2542
Location:
Under your rug
 
New postPosted: 2007-05-26, 11:39 am 

Yay! +woot

_________________
Image


User avatar
Reader
Profile

Posts: 118
Location:
Chicago, Illinois
 
New postPosted: 2007-05-26, 12:12 pm 

Very nice, definitely going to try it out. Only one thing I noticed, in the adding outputs, you set min_dist twice instead of min_dist and max_dist for env_glow:
ES:
      es_fire event_var(userid) server_var(mn_flare_glow_name) addoutput server_var(mn_flare_glow_min_dist)

      es_fire event_var(userid) server_var(mn_flare_glow_name) addoutput server_var(mn_flare_glow_min_dist)

_________________
[url=http://addons.eventscripts.com/addons/user/2238][img]http://addons.eventscripts.com/addons/userbar/2238/banner.png[/img][/url]
[url=http://www.gametracker.com/server_info/205.234.153.2:27015/][img]http://cache.www.gametracker.com/server_info/205.234.153.2:27015/b_560_95_1.png[/img][/url]


User avatar
Guru
Guru
Profile

Posts: 1633
Location:
feeding my rabbit
 
New postPosted: 2007-05-26, 12:51 pm 

Looks awesome, you can use on camping points to shock the enemy and rush em :D

_________________
.:Random Knifer


User avatar
Reader
Profile

Posts: 113
Location:
Chicago, IL
 
New postPosted: 2007-05-26, 1:41 pm 

killergp123 wrote:
Very nice, definitely going to try it out. Only one thing I noticed, in the adding outputs, you set min_dist twice instead of min_dist and max_dist for env_glow:
ES:
      es_fire event_var(userid) server_var(mn_flare_glow_name) addoutput server_var(mn_flare_glow_min_dist)
      es_fire event_var(userid) server_var(mn_flare_glow_name) addoutput server_var(mn_flare_glow_min_dist)


Nice catch, killergp123 re uping with random colors and cleanup functons.

_________________
Image


User avatar
Reader
Profile

Posts: 118
Location:
Chicago, Illinois
 
New postPosted: 2007-05-26, 5:04 pm 

If you want to use authprovider instead of having them put the steam id's into a variable, I know I am doing that with this script. Use this code for the event player_Say:
ES:
    event player_say

    {

      es :auth isUseridAuthorized mn_flare_steam event_var(userid) "flare_cleanup"

      if(server_var(mn_flare_steam) != 0)do

      {

        if(event_var(text) == !flareclean)do

        {

          if(server_var(mn_flare_type) == 2) then es_fire event_var(userid) flashbang_projectile Kill

          es_fire event_var(userid) env_lightglow Kill

          es_fire event_var(userid) light_dynamic TurnOff

          es_delayed .1 es_fire event_var(userid) server_var(mn_flare_light_name) Kill

        }

      }

    }

_________________
[url=http://addons.eventscripts.com/addons/user/2238][img]http://addons.eventscripts.com/addons/userbar/2238/banner.png[/img][/url]
[url=http://www.gametracker.com/server_info/205.234.153.2:27015/][img]http://cache.www.gametracker.com/server_info/205.234.153.2:27015/b_560_95_1.png[/img][/url]


User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 12901
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-05-26, 5:30 pm 

M4j1kN1nj4--
This is awesome. Great idea to a fantastic finish. Keep up the good work! :)
+w00t!

killergp123--
ES:
    block load

    {

       [...]

       es_xset mn_flare_sayuser 0

       clientcmd create say !flareclean "mn_flare/flareclean" "flare_cleanup" #admin

    }



    block flareclean

    {

       es_xgetcmduserid mn_flare_sayuser

       if (server_var(mn_flare_type) == 2) do

       {

          es_fire server_var(mn_flare_sayuser) flashbang_projectile Kill

       }

       es_fire server_var(mn_flare_sayuser) env_lightglow Kill

       es_fire server_var(mn_flare_sayuser) light_dynamic TurnOff

       es_delayed .1 es_xfire server_var(mn_flare_sayuser) server_var(mn_flare_light_name) Kill

    }
Don't make things complicated. This would also have the benefit of not broadcasting the say command. I like the idea of using 1.5 Authorization.


Last edited by SuperDave on 2007-05-26, 5:40 pm, edited 1 time in total.

User avatar
Reader
Profile

Posts: 118
Location:
Chicago, Illinois
 
New postPosted: 2007-05-26, 5:37 pm 

I was just editing what he had, not making things complicatd for him. This was what he originally had:
ES:
    event player_say

    {

            es_getplayersteamid mn_flare_steam event_var(userid)

            if(server_var(mn_flare_steam) in server_var(mn_flare_admins))do

            {

                    if(event_var(text) == !flareclean)do

                    {

                            if(server_var(mn_flare_type) == 2) then es_fire event_var(userid) flashbang_projectile Kill

                            es_fire event_var(userid) env_lightglow Kill

                            es_fire event_var(userid) light_dynamic TurnOff

                            es_delayed .1 es_fire event_var(userid) server_var(mn_flare_light_name) Kill

                    }

            }

    }

With the steam id's stored in server_var(mn_flare_admins)

I use clientcmd create say stuff for the mariorpg I am making, so I know how to use that.

_________________
[url=http://addons.eventscripts.com/addons/user/2238][img]http://addons.eventscripts.com/addons/userbar/2238/banner.png[/img][/url]
[url=http://www.gametracker.com/server_info/205.234.153.2:27015/][img]http://cache.www.gametracker.com/server_info/205.234.153.2:27015/b_560_95_1.png[/img][/url]


User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 12901
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-05-26, 5:48 pm 

Lol... Glad you do. Even if I were to edit what M4j1kN1nj4 had, I would still change it to my suggestion. :?

You code would work, but I the code I posted is less complicated and has the benefit of not broadcasting the say command. Easy to understand, my friend... easy to understand.

Although, I wouldn't be doing M4j1kN1nj4 justice posting a comment here without mentioning again that this script is wonderful the way it is! :D


User avatar
Historian
Historian
Profile

Posts: 2542
Location:
Under your rug
 
New postPosted: 2007-05-26, 5:51 pm 

I agree, I suggest you make use of Auth. No one wants to set admins for every script.

EDIT: (Lol, big edit)

Using event_var(userid) in a delayed block? Not good, not good. ;)

You use event_var(userid) in block cleanup, that is just a looped block, you should do es_getuserid <var> and that will get a random valid userid to use.

I also suggest using repeat for your loop

Code:
event round_start
{
  ifx true(mn_flare_cleanup) do
  {
    repeat create mn_flare_cleanup "es_xdoblock mn_flare/cleanup"
    repeat start mn_flare_cleanup (mn_flare_cleanup)
  }
}


Don't worry that it is recreated every round, that will basically just reset the loop.

I personally don't like the method you use for cleanup. Because what if you throw a flare 2 seconds before that cleanup block is executed? It kills all flashbang_projectiles.

You should just do an delayed es_remove after creating it, but use the name you set it to with est_setentname. server_var(mn_flare_glow_name) for example.

_________________
Image


Last edited by SumGuy14 on 2007-05-26, 6:03 pm, edited 2 times in total.

User avatar
EventScripts Administrator
EventScripts Administrator
Profile

Posts: 12901
Location:
irc://irc.gamesurge.net/eventscripts
 
New postPosted: 2007-05-26, 5:57 pm 

Forgot to mention:
ES:
    block unload

    {

       [...]

       clientcmd delete say !flareclean

    }
:oops:


User avatar
Reader
Profile

Posts: 118
Location:
Chicago, Illinois
 
New postPosted: 2007-05-26, 6:06 pm 

After testing the newest version, the flashbang and glow gets removed, but the dynamic light stays:
Detonated at 4:29:
Image
Still there at 3:42:
Image
Using admin doesn't even remove it:
Image

_________________
[url=http://addons.eventscripts.com/addons/user/2238][img]http://addons.eventscripts.com/addons/userbar/2238/banner.png[/img][/url]
[url=http://www.gametracker.com/server_info/205.234.153.2:27015/][img]http://cache.www.gametracker.com/server_info/205.234.153.2:27015/b_560_95_1.png[/img][/url]


User avatar
Historian
Historian
Profile

Posts: 2542
Location:
Under your rug
 
New postPosted: 2007-05-26, 6:09 pm 

He is using event_var(userid) in all his es_fire's, even in events like round_end. So that's why. I believe.

EDIT No it's because he is telling it to "TurnOff." It needs to be killed or es_remove'd.

_________________
Image


Last edited by SumGuy14 on 2007-05-26, 6:13 pm, edited 1 time in total.

User avatar
Reader
Profile

Posts: 113
Location:
Chicago, IL
 
New postPosted: 2007-05-26, 6:11 pm 

Yeah going to fix that....

_________________
Image


User avatar
Historian
Historian
Profile

Posts: 2542
Location:
Under your rug
 
New postPosted: 2007-05-26, 6:15 pm 

After all those corrections/suggestions I forgot to mention how cool this mod is ;) :P

_________________
Image


User avatar
Reader
Profile

Posts: 113
Location:
Chicago, IL
 
New postPosted: 2007-05-26, 9:15 pm 

Smoke / steam has been suggested
As well as deleting flares when a player leaves/switches teams

Looking into those options.

Play test, tell me what to fix! hehe

_________________
Image


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group