Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include < amxmodx >
- #include < amxmisc >
- #include < cstrike >
- #include < fakemeta >
- new const PLUGIN[ ] = "Furien: Knife Blood Effects";
- new const VERSION[ ] = "1.0";
- new g_exploSpr;
- public plugin_precache( )
- {
- // Precache Sprite ID
- g_exploSpr = engfunc( EngFunc_PrecacheModel, "sprites/shockwave.spr" )
- }
- public plugin_init( )
- {
- register_plugin( PLUGIN, VERSION, "Adventx" )
- register_event( "DeathMsg", "event_deathmsg", "a" )
- register_cvar( "knifeblood_version", VERSION, FCVAR_SERVER|FCVAR_SPONLY )
- }
- public event_deathmsg( )
- {
- new iAttacker = read_data( 1 )
- new iVictim = read_data( 2 )
- if( iAttacker == iVictim )
- return;
- if( cs_get_user_team( iAttacker ) == CS_TEAM_T && get_user_weapon( iAttacker ) == CSW_KNIFE )
- {
- static Float:fOrigin[ 3 ]
- pev( iVictim, pev_origin, fOrigin )
- UTIL_CreateBlood( fOrigin )
- }
- }
- stock UTIL_CreateBlood( const Float:fOrigin[3] )
- {
- // Smallest ring
- engfunc( EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, fOrigin, 0 )
- write_byte( TE_BEAMCYLINDER ) // TE id
- engfunc( EngFunc_WriteCoord, fOrigin[ 0 ] ) // x
- engfunc( EngFunc_WriteCoord, fOrigin[ 1 ] ) // y
- engfunc( EngFunc_WriteCoord, fOrigin[ 2 ] ) // z
- engfunc( EngFunc_WriteCoord, fOrigin[ 0 ] ) // x axis
- engfunc( EngFunc_WriteCoord, fOrigin[ 1 ] ) // y axis
- engfunc( EngFunc_WriteCoord, fOrigin[ 2 ]+385.0 ) // z axis
- write_short( g_exploSpr ) // sprite
- write_byte( 0 ) // startframe
- write_byte( 0 ) // framerate
- write_byte( 4 ) // life
- write_byte( 60 ) // width
- write_byte( 0 ) // noise
- write_byte( random( 256 )) // red
- write_byte( random( 256 )) // green
- write_byte( random( 256 )) // blue
- write_byte( 200 ) // brightness
- write_byte( 0 ) // speed
- message_end( )
- // Medium ring
- engfunc( EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, fOrigin, 0 )
- write_byte( TE_BEAMCYLINDER ) // TE id
- engfunc( EngFunc_WriteCoord, fOrigin[ 0 ] ) // x
- engfunc( EngFunc_WriteCoord, fOrigin[ 1 ] ) // y
- engfunc( EngFunc_WriteCoord, fOrigin[ 2 ] ) // z
- engfunc( EngFunc_WriteCoord, fOrigin[ 0 ] ) // x axis
- engfunc( EngFunc_WriteCoord, fOrigin[ 1 ] ) // y axis
- engfunc( EngFunc_WriteCoord, fOrigin[ 2 ]+470.0 ) // z axis
- write_short( g_exploSpr ) // sprite
- write_byte( 0 ) // startframe
- write_byte( 0 ) // framerate
- write_byte( 4 ) // life
- write_byte( 60 ) // width
- write_byte( 0 ) // noise
- write_byte( random( 256 )) // red
- write_byte( random( 256 )) // green
- write_byte( random( 256 )) // blue
- write_byte( 200 ) // brightness
- write_byte( 0 ) // speed
- message_end( )
- // Largest ring
- engfunc( EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, fOrigin, 0 )
- write_byte( TE_BEAMCYLINDER ) // TE id
- engfunc( EngFunc_WriteCoord, fOrigin[ 0 ] ) // x
- engfunc( EngFunc_WriteCoord, fOrigin[ 1 ] ) // y
- engfunc( EngFunc_WriteCoord, fOrigin[ 2 ] ) // z
- engfunc( EngFunc_WriteCoord, fOrigin[ 0 ] ) // x axis
- engfunc( EngFunc_WriteCoord, fOrigin[ 1 ] ) // y axis
- engfunc( EngFunc_WriteCoord, fOrigin[ 2 ]+555.0 ) // z axis
- write_short( g_exploSpr ) // sprite
- write_byte( 0 ) // startframe
- write_byte( 0 ) // framerate
- write_byte( 4 ) // life
- write_byte( 60 ) // width
- write_byte( 0 ) // noise
- write_byte( random( 256 )) // red
- write_byte( random( 256 )) // green
- write_byte( random( 256 )) // blue
- write_byte( 200 ) // brightness
- write_byte( 0 ) // speed
- message_end( )
- }
- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
- *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
- */
Advertisement
Add Comment
Please, Sign In to add comment