|
发表于 2009-3-9 00:59:39
|
显示全部楼层
|阅读模式
来自 中国–广东–广州–白云区
说明:
当敌人用AWP开镜.描着你的时侯
你的屏幕会发红光.警报
本人认为这个有点意思
如有人会改的话.请多加段语音代码下去就更完美啦
sv_scopealert 1 //(默认是: 1 )- #include <amxmodx>
- #include <cstrike>
- #include <fakemeta>
- #pragma semicolon 1
- new g_Enabled;
- new g_msgScreenFade;
- new bool:g_AlreadyZoomed[33];
- public plugin_init() {
- register_plugin( "Scope Alert", "1.1", "xPaw" );
-
- register_forward( FM_PlayerPreThink, "fwdPlayerPreThink" );
-
- g_Enabled = register_cvar( "sv_scopealert", "1" );
- g_msgScreenFade = get_user_msgid( "ScreenFade" );
- }
- public fwdPlayerPreThink( id ) {
- if( get_pcvar_num(g_Enabled) && is_user_alive(id) ) {
- new iTarget, iBody;
- get_user_aiming( id, iTarget, iBody );
-
- if( is_user_alive(iTarget) && !g_AlreadyZoomed[iTarget] && get_user_team(id) != get_user_team(iTarget) ) {
- if ( CS_SET_FIRST_ZOOM <= cs_get_user_zoom(id) <= CS_SET_SECOND_ZOOM ) {
- message_begin( MSG_ONE_UNRELIABLE, g_msgScreenFade, _, iTarget );
- write_short( 500 ); // duration
- write_short( 500 ); // hold time
- write_short( SF_FADE_IN ); // flags
- write_byte( 255 ); // red
- write_byte( 010 ); // green
- write_byte( 010 ); // blue
- write_byte( 60 ); // alpha
- message_end();
-
- // Doing delay, to prevent total red screen on target. :)
- g_AlreadyZoomed[iTarget] = true;
- set_task(2.0, "fnRemoveZoomed", iTarget);
- }
- }
- }
- }
- public client_connect( id )
- if( get_pcvar_num(g_Enabled) )
- g_AlreadyZoomed[id] = false;
- public fnRemoveZoomed( id )
- g_AlreadyZoomed[id] = false;
复制代码 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|