LondoN eXtream Posted December 9, 2015 Share Posted December 9, 2015 Descriere: Acest plugin l-am conceput special pentru modul Zombie Plague. Acest plugin inlocuieste grenada Napalm [Cea care face lumina] cu un Smoke care explodeaza si ofera ammo jucatorului si scade random intre 0 - 700.0 din viata ZM-ului. Download: #include < amxmodx >#include < amxmisc >#include < fakemeta >#include < hamsandwich >#include < engine >#include < zombieplague >#define PLUGIN "Smoke Explode"#define VERSION "1.0"#define AUTHOR "LondoN eXtream"#define CHAT_PREFIX "ZM"// pev typesconst PEV_NADE_TYPE = pev_flTimeStepSound;const PEV_NADE_TYPE_SMOKE = 681856;// Variablesnew g_Explo = 0;public plugin_init ( ){ register_plugin ( PLUGIN, VERSION, AUTHOR ); RegisterHam ( Ham_Think, "grenade", "HamThink" );}public HamThink ( entity ){ if ( !pev_valid ( entity ) ) return HAM_IGNORED; new Float:dmgtime; pev ( entity, pev_dmgtime, dmgtime ); if ( dmgtime > get_gametime ( ) ) return HAM_IGNORED; if ( pev ( entity, PEV_NADE_TYPE ) != PEV_NADE_TYPE_SMOKE ) return HAM_IGNORED; SmokeExplode ( entity ); engfunc ( EngFunc_RemoveEntity, entity ); return HAM_SUPERCEDE;}SmokeExplode ( entity ) { new Float: Origin [ 3 ], Float: clOrigin [ 3 ], Float: Velocity [ 3 ], Float: Distance, Float: Damage; new Special [ 3 ], szName [ 32 ]; new health, owner, i; pev ( entity, pev_origin, Origin ); FVecIVec ( Origin, Special ); owner = pev ( entity, pev_owner ); if ( !pev_valid ( owner ) || !is_user_connected ( owner ) ) { engfunc ( EngFunc_RemoveEntity, entity ); return; } message_begin ( MSG_BROADCAST, SVC_TEMPENTITY ); write_byte ( TE_EXPLOSION ); write_coord ( Special [ 0 ] ); write_coord ( Special [ 1 ] ); write_coord ( Special [ 2 ] ); write_short ( g_Explo ); write_byte ( 32 ); write_byte ( 16 ); write_byte ( 0 ); message_end ( ); for ( i = 1; i <= get_maxplayers ( ); i++ ) { if ( !is_user_alive ( i ) ) continue; if ( !zp_get_user_zombie ( i ) ) continue; pev ( i, pev_origin, clOrigin ); Distance = get_distance_f ( Origin, clOrigin ); if ( Distance < 330 ) { Damage = 700.0 - Distance; health = get_user_health ( i ); Damage = float ( floatround ( Damage ) ); pev ( i, pev_velocity, Velocity ); Velocity [ 0 ] += random_float ( -230.0, 230.0 ); Velocity [ 1 ] += random_float ( -230.0, 230.0 ); Velocity [ 2 ] += random_float ( 60.0, 129.0 ); set_pev ( i, pev_velocity, Velocity ); message_begin ( MSG_ONE_UNRELIABLE, get_user_msgid ( "ScreenFade" ), _, i ); write_short ( 4096 ); write_short ( 4096 ); write_short ( 0x0000 ); write_byte ( 225 ); write_byte ( 0 ); write_byte ( 0 ); write_byte ( 220 ); message_end ( ); message_begin ( MSG_ONE_UNRELIABLE, get_user_msgid ( "ScreenShake" ), _, i ); write_short ( 4096 * 6 ); write_short ( 4096 * random_num ( 4, 12 ) ); write_short ( 4096 * random_num ( 4, 12 ) ); message_end ( ); if ( health - floatround ( Damage ) < 0 ) { ExecuteHamB ( Ham_Killed, i, owner, 2 ); } else { ExecuteHamB ( Ham_TakeDamage, i, entity, owner, Damage, DMG_MORTAR ); } get_user_name ( i, szName, sizeof ( szName ) -1 ); ColorChat ( owner, "!x04[%s] !x03Damage to !x04%s !x03:: !x04%d", CHAT_PREFIX, szName, floatround ( Damage ) ); } }}stock ColorChat(const id, const input[], any:...) {new count = 1, players[32];static msg[191];vformat(msg, 190, input, 3);replace_all(msg, 190, "!x04", "^4");replace_all(msg, 190, "!x03", "^3");if(id) players[0] = id;else get_players(players, count, "ch"); {for(new i = 0; i < count; i++) {if(is_user_connected(players)) {message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);write_byte(players);write_string(msg);message_end();}}}} Credite: ^ionutz^ - Stock colorchat functional MzQ* - mi-a oferit o parte din cod anul trecut ) Instalare: 1. Fisierul SmokeExplode.sma => /scripting 2. Fisierul SmokeExplode.amxx => /plugins 3. In plugins.ini adaugam: SmokeExplode.amxx 4. Intram in zombieplague.cfg si dezactivam napalm nade. Module necesare: FakeMeta Engine Hamsandwich Sper sa va placa. Link to comment Share on other sites More sharing options...
me KLAUS Posted December 9, 2015 Share Posted December 9, 2015 #define AUTHOR "LondoN eXtream" Poate ca l-ai editat Link to comment Share on other sites More sharing options...
Recommended Posts