Raised This Month: $ Target: $400
 0% 

Flash


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iPro
Junior Member
Join Date: Jun 2012
Old 11-30-2012 , 17:19   Flash
Reply With Quote #1

Hey guys, i would need a plugin that changes the flashbangs effect color. Default is WHITE, I want it to last abit longer and make it BLACK. Anybody could help?

Thanks!
iPro is offline
tyin
Member
Join Date: Jun 2011
Location: Macedonia
Old 11-30-2012 , 17:56   Re: Flash
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?t=15241
tyin is offline
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 11-30-2012 , 18:45   Re: Flash
Reply With Quote #3

Quote:
Originally Posted by tyin View Post
That one is too old.. use this for efficiency. (Better code, faster)
PHP Code:
#include <amxmodx>

#define PLUGIN    "Colored Flashbangs"
#define VERSION    "1.0"
#define AUTHOR    "v3x"

new g_pModeg_pColors[3]

public 
plugin_init()
{
    
register_plugin(PLUGIN,VERSION,AUTHOR)
    
register_message(get_user_msgid("ScreenFade"), "FlashedEvent")
    
// Cvars
    
g_pMode register_cvar("amx_fb_mode""1")
    
g_pColors[0] = register_cvar("amx_fb_r",    "255")
    
g_pColors[1] = register_cvar("amx_fb_g",    "25")
    
g_pColors[2] = register_cvar("amx_fb_b",    "25")
}

public 
FlashedEvent()
{
    new 
iMode
    
if( !(iMode get_pcvar_num(g_pMode) ) )
        return;
        
    if(
get_msg_arg_int(4) !=255 || get_msg_arg_int(5) != 255 || get_msg_arg_int(6) != 255 || get_msg_arg_int(7) < 199)
        return;
    
    switch(
iMode)
    {
        case 
1:
        {
            
set_msg_arg_int(4ARG_BYTEget_pcvar_num(g_pColors[0]))
            
set_msg_arg_int(5ARG_BYTEget_pcvar_num(g_pColors[1]))
            
set_msg_arg_int(6ARG_BYTEget_pcvar_num(g_pColors[2]))
        }

        case 
2:
        {
            
set_msg_arg_int(4ARG_BYTErandom_num(0,255))
            
set_msg_arg_int(5ARG_BYTErandom_num(0,255))
            
set_msg_arg_int(6ARG_BYTErandom_num(0,255))
        }
    }
    

__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.

Last edited by pokemonmaster; 11-30-2012 at 18:52.
pokemonmaster 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 19:36.


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