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

Dynamic Glow


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
Fire-Wired
Member
Join Date: May 2005
Location: Maryland
Old 08-17-2006 , 21:25   Dynamic Glow
Reply With Quote #1

plugin dynmic glow
by Fire-Wired

ABOUT
--------
This glow plugin allows for virtualy unlimited possiblitys for glowing. With features such as user self rendering, automatic
reloading of glow config file on change, ability to add/remove/edit config from in-game. Glows can also be binded to a SteamID
so only that player can use that glow, useful for personal glows.

FEATURES
----------
unlimited glow capability, with almost direct access to set_user_rendering
all permante glows are stored in a easy to edit glow.cfg file located: /addons/amxmodx/configs/
virtualy unlimited amount of glows in glow.cfg
glows are automaticly reloaded on changes to glow.cfg
in-game commands to add/remove/edit glows in glow.cfg
render commands exactly the same as entmod e_render
unique glow list feature with pagination (displays in plain text, only supported in games that support MOTD window)
random key in glow.cfg to have a random value
/glow random on <time> allows user to glow random colors that change ever <time> in seconds


USAGE/How To Use
------------------
download the example glows.cfg file and place it in your /addons/amxmodx/configs/ directory.

in-game commands are as follows:
/glow help | off | reload | list <page #> | remove <name> | display <name> | random <on|off> <time optional>
/glow add <name> <mode> <amount> <fx> <red> <green> <blue> <protect 0|1> <[ Description (brackets required) ]> <---- Admin Kick access required
/glow edit <name> <mode> <amount> <fx> <red> <green> <blue> <protect 0|1> <[ Description (brackets required) ]> <---- Admin Kick access required
/glow render <mode> <amount> <fx> <red> <green> <blue> <---- Admin Kick access required


Glow Format is as folows:
----------------------------

Name Mode Ammount Fx R G B SteamID Description

* Use zero for SteamID to not bind to a SteamID, use 1 to bind to your SteamID
* Description must be enclosed in Brackets [] for descriptions to work

Modes: (0 to 5)
0 = Normal
1 = TransColor - Hologram effect
2 = TransTexture - Hologram effect
3 = **!!NEVER Use This Option for Sprites Only!!**
4 = TransAlpha - Hologram effect
5 = TransAdd - Crystal effect

FX: (0 to 20)
0 = None - glow off 11 = Strobe Faster
1 = Pulse Slow 12 = Flicker Slow
2 = Pulse Fast 13 = Flicker Fast
3 = Pulse Slow Wide 14 = No Dissipation
4 = Pulse Fast Wide 15 = Distort
5 = Fade Slow 16 = Hologram
6 = Fade Fast 17 = Dead Player - Unknow fx
7 = Solid Slow 18 = Explode
8 = Solid Fast 19 = Glow Shell - use this for normal glowing
9 = Strobe Slow 20 = Clamp Min Scale - Unknown fx
10 = Strobe Fast

Ammount: 0 to 200

Red, Green, Blue: 0 to 255



CVARS
------
amx_glow_mode -- set's access level required to use /glow. Default is ADMIN_ALL
amx_glow_render -- set's access level required to use /glow render. Default is ADMIN_LEVEL_E
amx_glow_add -- set's access level required to use /glow add, remove, edit. Default is ADMIN_RCON
amx_glow_safe_remove -- set's safe removal of glow, 0 = remove glow from glow.cfg completely, 1 = just comment out glow. Default is 1 = On

Included is glow.cfg which goes in your /addons/amxmodx/configs/
Attached Files
File Type: sma Get Plugin or Get Source (dynamic_glow.sma - 1456 views - 29.5 KB)
File Type: cfg glows.cfg (8.2 KB, 411 views)
Fire-Wired is offline
Send a message via AIM to Fire-Wired Send a message via MSN to Fire-Wired Send a message via Yahoo to Fire-Wired
Zenith77
Veteran Member
Join Date: Aug 2005
Old 08-17-2006 , 21:37   Re: Dynamic Glow
Reply With Quote #2

Nice use of the md5 native ;)
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Kryptic
Member
Join Date: Jun 2006
Location: Vermont
Old 08-17-2006 , 22:33   Re: Dynamic Glow
Reply With Quote #3

Is it the big glow as in glowing pink for ATAC, or one of those small ones?
Kryptic is offline
Send a message via ICQ to Kryptic Send a message via AIM to Kryptic
Fire-Wired
Member
Join Date: May 2005
Location: Maryland
Old 08-17-2006 , 23:05   Re: Dynamic Glow
Reply With Quote #4

Quote:
Originally Posted by Zenith77 View Post
Nice use of the md5 native ;)
ya I found MD5 very useful.

Quote:
Originally Posted by Kryptic View Post
Is it the big glow as in glowing pink for ATAC, or one of those small ones?
You can customize the glow shell to be large or small, using the amount setting. A small white glow would be glow /glow render 0 20 19 255 255 255, while a large glow would be /glow render 0 200 19 255 255 255.
Fire-Wired is offline
Send a message via AIM to Fire-Wired Send a message via MSN to Fire-Wired Send a message via Yahoo to Fire-Wired
Plug!n l0v3r
Junior Member
Join Date: Jul 2006
Old 08-18-2006 , 00:41   Re: Dynamic Glow
Reply With Quote #5

looks GREAT! i will test as soon as i can.
__________________
Need a Good Server at low prices?
http://www.bloodservers.com
Has The CHEAPEST servers around.
ONE DOLLAR A SLOT?!?!
Hurry this offer Will end soon.

Plug!n l0v3r is offline
cozmicshredder
AlliedModders Donor
Join Date: Apr 2004
Location: MI, USA.
Old 08-18-2006 , 14:37   Re: Dynamic Glow
Reply With Quote #6

I been BETA Testing this plugin on my BrainBread server for a while must say it is vary popular!
__________________
cozmicshredder is offline
Send a message via ICQ to cozmicshredder Send a message via AIM to cozmicshredder Send a message via MSN to cozmicshredder Send a message via Yahoo to cozmicshredder Send a message via Skype™ to cozmicshredder
Warnink
SourceMod Donor
Join Date: Aug 2006
Location: United Kingdom
Old 08-19-2006 , 11:17   Re: Dynamic Glow
Reply With Quote #7

Great stuff now me and my friends can use the same glow we use on Snark Cafe while Enting on my server!!

Good work Fire

Last edited by Warnink; 08-19-2006 at 11:21.
Warnink is offline
omghax
Member
Join Date: Dec 2005
Location: eth0
Old 08-20-2006 , 02:58   Re: Dynamic Glow
Reply With Quote #8

Nice,
__________________
Quote:
George Carlin: Reminds me of something my grandfather used to say. He used to say "I'm going upstairs and fuck your grandmother." Well, he was an honest guy, you know? He wasn't going to lie to a little kid.
omghax is offline
Send a message via AIM to omghax Send a message via MSN to omghax Send a message via Yahoo to omghax Send a message via Skype™ to omghax
Casio
Member
Join Date: Jan 2005
Old 08-24-2006 , 10:40   Re: Dynamic Glow
Reply With Quote #9

Can I make a constructive suggestion? Your find_glow method could be slightly more efficient if you replace the "found = true" line with "return (i - 1)" and then add "return -1" after the For loop's close bracket.
I suggest this change because currently your code will continue the For loop to its end even if your If statement has found the target glow_name.

To be clear, I recommend changing this code:
Code:
find_glow(glow_name[])
{
    new bool:found = false
    new i, returnval
        
    for(i = 0; i < g_totalglows && !found; i++)
    {
        if ( strcmp(glow_name,g_glows[i][0][0], true) == 0 )
        {
            found = true
        }
    }
    
    if (!found)
    {
       returnval = -1    // return -1 which means not found
    } else
    {
       returnval = i - 1 // correction since counter loops again to find it has already found the glow, slight bug
    }
    
    return returnval
}
To this code:
Code:
find_glow(glow_name[])
{
    new i
        
    for(i = 0; i < g_totalglows && !found; i++)
    {
        if ( strcmp(glow_name,g_glows[i][0][0], true) == 0 )
        {
	   // correction since counter loops again to find it has already found the glow, slight bug
            return (i - 1)
        }
    }
    return -1    // return -1 which means not found
}
It isn't a huge change as you can see, it just makes the For loop run potentially shorter and eliminates that second If statement as well as 2 variables.

It's just a suggestion,
Casio.
Casio is offline
Casio
Member
Join Date: Jan 2005
Old 08-28-2006 , 09:14   Re: Dynamic Glow
Reply With Quote #10

I'm guessing it's a noob suggestion since noone has commented :s
Casio 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 13:13.


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