Raised This Month: $32 Target: $400
 8% 

team Color Flashbangs


Post New Thread Reply   
 
Thread Tools Display Modes
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
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 11-27-2007 , 07:33   Re: team Color Flashbangs
Reply With Quote #2

What is it doing that's wrong?

Apart from only working if noone throws a 'nade between the one throw and its flash.
purple_pixie is offline
zwfgdlc
Senior Member
Join Date: May 2006
Old 11-27-2007 , 08:07   Re: team Color Flashbangs
Reply With Quote #3

When the flashbangs of CT has not been exploded yet, if T throws the flashbangs away, then the color is red. . .
How to solve this problem?
zwfgdlc is offline
_Master_
Senior Member
Join Date: Dec 2006
Old 11-27-2007 , 08:40   Re: team Color Flashbangs
Reply With Quote #4

Please post in Scripting Help next time.
This has nothing to do with general amxx issues.
_Master_ is offline
Old 11-27-2007, 08:57
Arkshine
This message has been deleted by Arkshine. Reason: Ooops.
Reply


Thread Tools
Display Modes

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 22:08.


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