new const szDeath_symbol_spr[] = "models/bskull_template1.mdl"; new const szDeath_symbol_tr[] = "sprites/smoke.spr"; new smoke, skull; new g_cam,g_train,g_corner
public client_death(victim,killer) { if ( killer <= 0 || killer == victim || is_user_bot(victim)) return PLUGIN_HANDLED_MAIN if ( killer > 0 ) if(is_user_connected(victim) && !is_user_alive(victim) && !is_user_bot(victim) && is_user_connected(killer))
{ set_view(victim, CAMERA_3RDPERSON); console_cmd(victim, "default_fov 150"); new Deathcam[3]; new Eye = 1; get_user_origin(victim,Deathcam,Eye);
#define TE_LIGHTNING 7 // TE_BEAMPOINTS with simplified parameters
new Korigin[3]; get_user_origin(killer,Korigin,Eye);
/* new Float:Vaim[3]; new iVelocity; iVelocity = 1.0 velocity_by_aim(killer, iVelocity, Vaim)
emessage_begin( 0, SVC_TEMPENTITY, { 0, 0, 0 }, 0 ); ewrite_byte(TE_PROJECTILE); ewrite_coord(Korigin[0]); // start position ewrite_coord(Korigin[1]); ewrite_coord(Korigin[2]); ewrite_coord(floatround(Vaim[0])); // end position ewrite_coord(floatround(Vaim[1])); ewrite_coord(floatround(Vaim[2])); ewrite_short(smoke) ewrite_byte(100) ewrite_byte(0) //projectile won't collide with owner (if owner == 0, projectile will hit any client). emessage_end(); */
emessage_begin( MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, { 0, 0, 0 }, victim ); ewrite_byte(TE_LIGHTNING); ewrite_coord(Korigin[0]); // start position ewrite_coord(Korigin[1]); ewrite_coord(Korigin[2]); ewrite_coord(Deathcam[0]); // end position ewrite_coord(Deathcam[1]); ewrite_coord(Deathcam[2]); ewrite_byte(65); // life in 0.1's ewrite_byte(100); // width in 0.1's ewrite_byte(15); // amplitude in 0.01's ewrite_short(smoke); // sprite model index emessage_end();
i guess it can be done, we have an example with grenades, but it would be bad too to the shooter against multiple enemies, if i shoot someone and watch the bullet, when i`m back someone else would have killed me too xD
1. Catching prekilled, drop framerate to everyone and re-create the shot with fake-bullet, but camera behind it.
2. Woud be a bit more work, making it like a kill-cam system. Record everyplayer for 3-5secs (replace oldest with new data, ...) and make a replay of what happend in low framerate the killer and victim. And then create the fake-bullet, camera & put everyone's view to it.
Pasted the code on how I did the animated snippet with lightening coming out of barrel as a tracer and included the URL on how to make this in Hammer. It can be translated into Amxx. Trigger camera, func_train, and path_corner is what is needed from what I can see. Will toy with it later.