// FatalShots script addon by GODJonez // Idea by Baikie // // When a player recieves over 50-70 damage in one hit from anything, // an explosion occurs which kills him and makes his body fly somewhere. // *************************************** // // Script configuration, edit as necessary // // *************************************** // block config { // Set the minimum damage the player must take in one shot to be exploded: fatal_mindamage 70 // Set the effect radius of the explosion: fatal_radius 200 // Set the power of the explosion: fatal_magnitude 1000 // Set to 1 to display advertising text on round start fatal_advertise 1 } // **************************************** // // The rest of the code is not to be edited // // **************************************** // block load { // Variable declarations: es_xsetinfo fatal_mindamage 0 es_xsetinfo fatal_radius 0 es_xsetinfo fatal_magnitude 0 es_xsetinfo fatal_advertise 0 es_xsetinfo _fatal_temp 0 es_xsetinfo _fatal_handle 0 es_xsetinfo _fatal_x 0 es_xsetinfo _fatal_y 0 es_xsetinfo _fatal_z 0 es_xsetinfo _fatal_rnd 0 es_xsetinfo fatalshots_ver "v1.0" es_xmakepublic fatalshots_ver es_setinfo phys_pushscale0 server_var(phys_pushscale) // Load user's config es_xdoblock fatalshots/config } block unload { fatalshots_ver "v1.0 disabled" } event player_hurt { if (event_var(dmg_health) >= server_var(fatal_mindamage)) do { phys_pushscale 3 es_delayed 1 phys_pushscale server_var(phys_pushscale0) es_getplayerhandle _fatal_handle event_var(attacker) es_give event_var(userid) env_explosion es_getplayerlocation _fatal_x _fatal_y _fatal_z event_var(userid) es_xrand _fatal_rnd -30 30 es_math _fatal_x + serer_var(_fatal_rnd) es_xrand _fatal_rnd -30 30 es_math _fatal_y + serer_var(_fatal_rnd) es_createvectorstring _fatal_temp server_var(_fatal_x) server_var(_fatal_y) server_var(_fatal_z) es_setindexprop server_var(eventscripts_lastgive) "CBaseEntity.m_vecOrigin" server_var(_fatal_temp) es_format _fatal_temp "iMagnitude %1" server_var(fatal_magnitude) es_fire event_var(userid) env_explosion addoutput server_var(_fatal_temp) es_format _fatal_temp "iRadiusOverride %1" server_var(fatal_radius) es_fire event_var(userid) env_explosion addoutput server_var(_fatal_temp) es_setindexprop server_var(eventscripts_lastgive) "CBaseEntity.m_hOwnerEntity" server_var(_fatal_handle) es_fire event_var(userid) env_explosion Explode } } event round_start { ent_remove_all env_explosion if (server_var(fatal_advertise) == 1) do { es_xmsg #multi #greenFatalShots:#lightgreen Fatal shots cause explosions! } }