Raised This Month: $ Target: $400
 0% 

team Color Flashbangs


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
zwfgdlc
Senior Member
Join Date: May 2006
Old 11-27-2007 , 07:25   team Color Flashbangs
Reply With Quote #1

All player's screens are blue when it is played that CT throws away to FLASHBANG;
All player's screens are red when it is played that T throws away to FLASHBANG;
The following is a code, the fault where? Help me!
PHP Code:
#include <amxmodx>
#include <engine>

#define PLUGIN    "team Color Flashbangs"
#define VERSION    "1.0"
#define AUTHOR    "zwfgdlc"


new g_nMsgScreenFade
new team
public plugin_init()
{
    
register_plugin(PLUGIN,VERSION,AUTHOR)
    
register_event("ScreenFade","FlashedEvent","be","4=255","5=255","6=255","7>199")
    
g_nMsgScreenFade get_user_msgid("ScreenFade")
}

public 
grenade_throw(idgreindexwpnid)
{
    if(
wpnid==CSW_FLASHBANG)
    
team=get_user_team(id)
}

public 
FlashedEventid )
{
    new 
iRed,iGreen,iBlue
    
if (team==1)
    {
        
iRed 255
        iGreen 
90
        iBlue 
90
    
}else{
        
iRed 125
        iGreen 
125
        iBlue 
=  255        
    
}

    
message_beginMSG_ONE,g_nMsgScreenFade,{0,0,0},id )
    
write_shortread_data) )    // Duration
    
write_shortread_data) )    // Hold time
    
write_shortread_data) )    // Fade type
    
write_byte iRed )        // Red
    
write_byte iGreen )        // Green
    
write_byte iBlue )        // Blue
    
write_byte read_data) )    // Alpha
    
message_end()
    return 
PLUGIN_HANDLED


Last edited by zwfgdlc; 11-27-2007 at 07:28.
zwfgdlc is offline
 



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 11:12.


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