![]() |
|
[Plugin] New HE Granade Effect - Printable Version +- eSportsKosova - Gaming Community (https://esportskosova.com) +-- Forum: HAPËSIRA E COUNTER-STRIKE (https://esportskosova.com/forum-7.html) +--- Forum: Counter-Strike 1.6 (https://esportskosova.com/forum-19.html) +---- Forum: Amx Mod X (https://esportskosova.com/forum-58.html) +----- Forum: AMX - Plugin's (https://esportskosova.com/forum-193.html) +----- Thread: [Plugin] New HE Granade Effect (/thread-49611.html) Pages:
1
2
|
[Plugin] New HE Granade Effect - Dinnii - 10-18-2024 ![]() Kit plugin e qita tash masi qe jan festat e fundvitit edhe mu pershtat diqka me fishekzjarre ![]() - Emri: New HE Granade Effect - Verzioni: V1.3 - Autori: aNNak1N - Editori: Dinnii - SMA File [spoiler]===========================================================================================================================*/ #include < amxmodx > #include < fakemeta > #include < fakemeta_util > #include < hamsandwich > #define PLUGIN "New HE Grenade Effects" #define VERSION "1.3" #define AUTHOR "aNNak1N" #define EDITOR "Dinnii" new const g_szFireGib[ ] = "sprites/firegib.spr"; new const g_szExplosionFire[ ] = "sprites/fireexplosion.spr"; new const g_szFireWorks[ ] = "sprites/fireworks_sprite2.spr"; new const g_szFireWorks2[ ] = "sprites/fireworks_sprite1.spr"; new FwFireGib, FwExplosionFire, FwTrail, FwExplode; new g_iCvarChangeMode; //constantele pentru stock const m_fBombStatus = 96; const m_usEvent = 114; const fBombPlanted = 1 << 8; const fExploEvent = 1 << 0; const fSmokeEvent = 1 << 1; public plugin_init( ) { register_plugin( PLUGIN, VERSION, AUTHOR ); register_forward( FM_SetModel, "fw_SetWmodel", 1 ); RegisterHam( Ham_Think, "grenade", "ham_grenade_think", 0 ); g_iCvarChangeMode = register_cvar( "he_change_mode", "1" ); } public plugin_precache( ) { FwFireGib = precache_model( g_szFireGib ); FwExplosionFire = precache_model( g_szExplosionFire ); FwTrail = precache_model( g_szFireWorks ); FwExplode = precache_model( g_szFireWorks2 ); } public fw_SetWmodel( ent, model[ ] ) { if( !fm_is_ent_grenade( ent ) ) return FMRES_IGNORED; set_pev( ent, pev_bInDuck, 1 ); return FMRES_IGNORED; } bool: fm_is_ent_grenade( entity ) { new classname[ 9 ]; pev( entity, pev_classname, classname, 8 ); if( !equal( classname, "grenade" ) ) return false; new bits = get_pdata_int( entity, 114 ); if( bits & ( 1<<0 ) ) return true; return false; } public ham_grenade_think( ent ) { if( !pev( ent, pev_bInDuck ) ) return FMRES_IGNORED; new Float:dmgtime; pev( ent, pev_dmgtime, dmgtime ); if( dmgtime > get_gametime( ) ) return FMRES_IGNORED; HEGrenadeFwEffects( ent ); return FMRES_OVERRIDE; } public HEGrenadeFwEffects( entity ) { if( grenade_type( entity ) == CSW_HEGRENADE ) //daca entitatea este grenada HE, atunci arata efectele { switch( get_pcvar_num( g_iCvarChangeMode ) ) { case 0: { new Float:fOrigin[ 3 ]; pev( entity, pev_origin, fOrigin ); // Medium ring engfunc( EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, fOrigin, 0 ); write_byte( TE_BEAMCYLINDER ); engfunc( EngFunc_WriteCoord, fOrigin[ 0 ] ); engfunc( EngFunc_WriteCoord, fOrigin[ 1 ] ); engfunc( EngFunc_WriteCoord, fOrigin[ 2 ] ); engfunc( EngFunc_WriteCoord, fOrigin[ 0 ] ); engfunc( EngFunc_WriteCoord, fOrigin[ 1 ] ); engfunc( EngFunc_WriteCoord, fOrigin[ 2 ] + 470.0 ); // z axis + radius write_short( FwExplosionFire ); write_byte( 0 ); // startframe write_byte( 0 ); // framerate write_byte( 4 ); // life write_byte( 60 ); // width write_byte( 0 ); // noise write_byte( 255 ); // red write_byte( 127 ); // green write_byte( 80 ); // 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 ); engfunc( EngFunc_WriteCoord, fOrigin[ 0 ] ); engfunc( EngFunc_WriteCoord, fOrigin[ 1 ] ); engfunc( EngFunc_WriteCoord, fOrigin[ 2 ] ); engfunc( EngFunc_WriteCoord, fOrigin[ 0 ] ); engfunc( EngFunc_WriteCoord, fOrigin[ 1 ] ); engfunc( EngFunc_WriteCoord, fOrigin[ 2 ] + 555.0 ); // z axis write_short( FwExplosionFire ); write_byte( 0 ); // startframe write_byte( 0 ); // framerate write_byte( 4 ); // life write_byte( 60 ); // width write_byte( 0 ); // noise write_byte( 255 ); // red write_byte( 127 ); // green write_byte( 80 ); // blue write_byte( 200 ); // brightness write_byte( 0 ); // speed message_end( ); // Luz Dinamica engfunc( EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, fOrigin, 0 ) write_byte( TE_DLIGHT ) // TE id engfunc( EngFunc_WriteCoord, fOrigin[ 0 ] ) // x engfunc( EngFunc_WriteCoord, fOrigin[ 1 ] ) // y engfunc( EngFunc_WriteCoord, fOrigin[ 2 ] ) // z write_byte( 50 ); // radio write_byte( 255 ); // red write_byte( 127 ); // green write_byte( 80 ); // blue write_byte( 30 ); // vida en 0.1, 30 = 3 segundos write_byte( 30 ); // velocidad de decaimiento message_end( ); engfunc( EngFunc_MessageBegin, MSG_BROADCAST, SVC_TEMPENTITY, fOrigin, 0); write_byte( TE_EXPLOSION ); engfunc( EngFunc_WriteCoord, fOrigin[ 0 ] ); // x axis engfunc( EngFunc_WriteCoord, fOrigin[ 1 ] ); // y axis engfunc( EngFunc_WriteCoord, fOrigin[ 2 ] + 75 ); // z axis write_short( FwExplosionFire ); write_byte( 17 ); write_byte( 15 ); write_byte( TE_EXPLFLAG_NOSOUND ); message_end( ); engfunc( EngFunc_MessageBegin, MSG_BROADCAST,SVC_TEMPENTITY, fOrigin, 0 ); write_byte( TE_SPRITETRAIL ); // TE ID engfunc( EngFunc_WriteCoord, fOrigin[ 0 ] ); // x axis engfunc( EngFunc_WriteCoord, fOrigin[ 1 ] ); // y axis engfunc( EngFunc_WriteCoord, fOrigin[ 2 ] + 40 ); // z axis engfunc( EngFunc_WriteCoord, fOrigin[ 0 ] ); // x axis engfunc( EngFunc_WriteCoord, fOrigin[ 1 ] ); // y axis engfunc( EngFunc_WriteCoord, fOrigin[ 2 ] ); // z axis write_short( FwFireGib ); // Sprite Index write_byte( 30 ); // Count write_byte( 10 ); // Life write_byte( 2 ); // Scale write_byte( 50 ); // Velocity Along Vector write_byte( 10 ); // Rendomness of Velocity message_end( ); } case 1: { new Float:fOrigin[ 3 ]; pev( entity, pev_origin, fOrigin ); engfunc( EngFunc_MessageBegin, MSG_PAS, SVC_TEMPENTITY, fOrigin, 0 ); write_byte( TE_WORLDDECAL ); engfunc( EngFunc_WriteCoord, fOrigin[ 0 ] ); engfunc( EngFunc_WriteCoord, fOrigin[ 1 ] ); engfunc( EngFunc_WriteCoord, fOrigin[ 2 ] ); write_byte( engfunc( EngFunc_DecalIndex,"{scorch3" ) ); message_end( ); message_begin( MSG_BROADCAST, SVC_TEMPENTITY ); write_byte( TE_EXPLOSION ); engfunc( EngFunc_WriteCoord, fOrigin[ 0 ] ); engfunc( EngFunc_WriteCoord, fOrigin[ 1 ] ); engfunc( EngFunc_WriteCoord, fOrigin[ 2 ] + 60.0 ); write_short( FwTrail ); write_byte( 10 ); write_byte( 15 ); write_byte( 0 ); message_end( ); message_begin( MSG_BROADCAST, SVC_TEMPENTITY ); write_byte( TE_SPRITE ); engfunc( EngFunc_WriteCoord, fOrigin[ 0 ] + random_float( -5.0, 5.0 ) ); engfunc( EngFunc_WriteCoord, fOrigin[ 1 ] + random_float( -5.0, 5.0 ) ); engfunc( EngFunc_WriteCoord, fOrigin[ 2 ] + 200.0 ); write_short( FwExplode ); write_byte( 15 ); write_byte( 200 ); message_end( ); } } } } //stocul de verificare a grenazilor stock grenade_type( const index, const checkClassName = 0 ) { static classname[ 9 ]; if( checkClassName ) { pev( index, pev_classname, classname, 8 ) if ( !equal( classname, "grenade") ) { return 0; } } if( get_pdata_int( index, m_fBombStatus ) & fBombPlanted ) { return 0; } static bits; bits = get_pdata_int( index, m_usEvent ); if( bits & fExploEvent ) { return CSW_HEGRENADE; } else if( !bits ) { return CSW_FLASHBANG; } else if( bits & fSmokeEvent ) { return CSW_SMOKEGRENADE; } return 0; } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par } */[/spoiler] ![]() - 1 new_he_effects.sma kët file, e fut atë në addons / amxmodx / scripting / këtu - 2 new_he_effects.amxx kët file, e fut atë në addons / amxmodx / plugins / këtu - 3 Emrin e files e shkruani brenda tek addons / amxmodx / configs / plugins.ini këtu - 4 Folderin sprites e dergoni tek /cstrike/ ![]() ![]() ![]() ![]() ![]() ![]() ![]() #SHKARKO Re: [Plugin] New HE Granade Effect - r0n1xx. - 10-18-2024 Shum i fort pluginsi brw Re: [Plugin] New HE Granade Effect - Dinnii - 10-18-2024 albinihosting Wrote:Shum i fort pluginsi brwFaleminderit
Re: [Plugin] New HE Granade Effect - ArgjentAl - 10-19-2024 Shum i fort e qitna nsrw ama nfurien po e bojke ni bug se po mujka mu perdor si sg granad :3 Re: [Plugin] New HE Granade Effect - Eduart96 - 10-19-2024 Shume plugin i lezetshem, flm
Re: [Plugin] New HE Granade Effect - Dinnii - 10-19-2024 ArgjentAl Wrote:Shum i fort e qitna nsrwNqs te bon Bug tek plugins.ini ne e shkrun new_he_effects.amxx debug
Re: [Plugin] New HE Granade Effect - Dinnii - 10-19-2024 Eduart96 Wrote:Shume plugin i lezetshem, flmFaleminderit
Re: [Plugin] New HE Granade Effect - TR1M1! - 10-19-2024 Bravo GJ koka shum i mir, amo shum pom pelqen qe e paske qit filen .SMA
Re: [Plugin] New HE Granade Effect - Dinnii - 10-19-2024 BABA.AL Wrote:Bravo GJFaleminderit Filen SMA e qita per me pas mundesi me editu tjert ndonje gje tjeter te nevojshme
|