|
楼主 |
发表于 2011-5-6 12:50:07
|
显示全部楼层
来自 中国–福建–厦门
能否用下面这个改呢?添加一个左下角聊天区域,显示谁闪的!
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include <csx>
#define PLUGIN "TeamColorFlash"
#define VERSION "1.0"
#define AUTHOR "Dt-Club.net"
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")
RegisterHam(Ham_Think,"grenade","on_nadethink")
g_nMsgScreenFade = get_user_msgid("ScreenFade")
}
public on_nadethink(id)
{
team = pev(id,pev_team)
}
public grenade_throw(id, greindex, wpnid)
{
if(wpnid==CSW_FLASHBANG)
set_pev(greindex,pev_team,get_user_team(id))
}
public FlashedEvent( id )
{
new iRed,iGreen,iBlue
if (team==1)
{
iRed = 255
iGreen = 90
iBlue = 90
}
else
{
iRed = 125
iGreen = 125
iBlue = 255
}
message_begin( MSG_ONE,g_nMsgScreenFade,{0,0,0},id )
write_short( read_data( 1 ) )
write_short( read_data( 2 ) )
write_short( read_data( 3 ) )
write_byte ( iRed )
write_byte ( iGreen )
write_byte ( iBlue )
write_byte ( read_data( 7 ) )
message_end()
return PLUGIN_HANDLED
} |
|