View Single Post
Plugin Info:     Modification:          Category:          Approver:   Exolent[jNr] (178)
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 08-29-2009 , 11:23   Head Hunter SmokeGrenade v1.5
Reply With Quote #1

Description:
This plugin turns the Smoke Grenade into a Head Hunter grenade, it will track the players head and if it touches it! HEADSHOT!
When the impact times will go out the grenade will destroy itself turning into scrap of metal.

Modules:
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <hamsandwich>


Cvars:
Code:
smhdh_distance_head_cut    100.0 // distance when the nade will have super-speed to cut the head
smhdh_distance_sense         400.0 // distance when the nade will sense a player
smhdh_distance_owner_head_cut  10.0 // distance when the nade will cut the owner head (only works when ignore_owner is 0!)
smhdh_impact_times            8 // Impact times before the nade desintegrates

smhdh_color_red                 0 // Red color effect
smhdh_color_green              214 // Green color effect
smhdh_color_blue                98 // Blue color effect

smhdh_velocity_correction    150.0 // Velocity added to the nade when targeting a player (x,y axis)
smhdh_height_correction      25.0  // Velocity added to the nade when targeting a player (z axis)[height]
smhdh_velocity_add             50.0  // Velocity correction (will work when the nade has low speed)
smhdh_velocity_border         200.0 // Velocity border correction (if nade speed is under this the speed will be accelerated)
smhdh_velocity_aim_for_head 800.0 // Super-velocity added to the nade when getting near the head
    
smhdh_hit_damage            500.0  // Damage when hitting a head
smhdh_remove_time           60.0  // Seconds after the nade will be removed
    
smhdh_ignore_friendly 1 // Ignore friendly (teammates can't be killed by nade)
smhdh_ignore_owner 1 // Ignore owner (owner can't be killed by nade)

smhdh_effects 1 // Plugin effects
Useful links:
Servers using this plugin

Movie:
http://www.youtube.com/watch?v=YF7i0F0_dz8

To do:
- Make the grenades shootable (kinetics/damage)

Changelog:
PHP Code:
V1.5 optimized the code a bitmade the line of sight function work better
V1.4 
fixed the crazy velocity bugadded time remove
V1.3 
made the plugin more customizable
V1.2 
added nade acceleration when nade is too slow
V1.1 
fixed weird bug
V1.0 
initial release 
Attached Files
File Type: sma Get Plugin or Get Source (head_hunter_smokegrenade.sma - 4954 views - 15.4 KB)
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.

Last edited by ot_207; 10-12-2009 at 19:11. Reason: Readded the plugin
ot_207 is offline