Here is something I got from an user.. (an base.. some sounds, about 35% of 'em)
Code: Select all
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <hlsdk_const>
#include <cstrike>
#include <fun>
#define PLUGIN_VERSION "Mark IV"
#define ADMIN_HEV ADMIN_SLAY /* You can change this line to change access to admin commands & access for buying HEV Suit */
new curweap[33][2]
new bool:hevtemp[33] = true /* Check if user's HEV Suit is allowed to talk to prevent spamming */
stock suit_next(index, Float:seconds) /* HEV Suit wont spam anymore */
{
hevtemp[index] = false
set_task(seconds, "hevtemp_on", index)
}
public plugin_init() { /* Plugin initialize */
register_plugin("HEV Voice System", PLUGIN_VERSION, "Alex 'fR4gn0tiX!' Managadze") /* Register plugin info */
register_event("DeathMsg", "hook_death", "a") /* Hook player's death */
register_event("CurWeapon", "weapons", "b") /* Hook "curweapon" function */
RegisterHam(Ham_TakeDamage, "player", "Ham_TakeDamage_Pre") /* Hook if player is taking damage */
}
public hook_death(id) /* Someone has died */
{
new victim = read_data(2) /* Who died? */
client_cmd(victim, "wait; wait; stopsound; spk ^"fvox/beep beep, beep beep, beep, flatline^"")
return PLUGIN_HANDLED
}
public Ham_TakeDamage_Pre(iVictim, iInflictor, iAttacker, Float:flDamage, iDamageBits) /* Hook if player is taking damage */
{
if (flDamage <= 0.0) /* If damage = 0 or damage < 0 */
return HAM_IGNORED
new CsArmorType:ArmorType
if (cs_get_user_armor(iVictim, ArmorType) < 50 && hevtemp[iVictim] == true) /* If victim has HEV Suit with voice system activated and armor is less than 50 */
{
client_cmd(iVictim, "spk ^"fvox/fuzz fuzz, power_below fifty percent^"")
suit_next(iVictim, 7.0) /* HEV Suit isn't allowed to talk next 7 seconds */
return HAM_IGNORED
}
if (get_user_health(iVictim) < 25 && hevtemp[iVictim] == true) /* If victim has HEV Suit with voice system activated and health is less than 25 */
{
client_cmd(iVictim, "spk ^"fvox/(p120) beep, beep, beep, (p100) health_critical^"")
suit_next(iVictim, 5.0) /* HEV Suit isn't allowed to talk next 5 seconds */
return HAM_IGNORED
}
if (iDamageBits & DMG_CLUB && hevtemp[iVictim] == true)
{
if (flDamage >= 150.0)
{
client_cmd(iVictim, "spk ^"fvox/(p160) boop, boop, boop, (p100) minor_fracture^"")
suit_next(iVictim, 5.0) /* HEV Suit isn't allowed to talk next 5 seconds */
}
return HAM_IGNORED
}
if (iDamageBits & (DMG_FALL | DMG_CRUSH) && hevtemp[iVictim] == true)
{
client_cmd(iVictim, "spk ^"fvox/(p160) boop, boop, boop, (p100) %s_fracture, %s^"", flDamage >= 30.0 ? "major" : "minor", flDamage >= 30.0 ? "(p160) boop, boop, boop, (p100) automedic_on hiss morphine_shot" : "")
suit_next(iVictim, 12.0) /* HEV Suit isn't allowed to talk next 12 seconds */
return HAM_IGNORED
}
if (iDamageBits & DMG_BULLET && hevtemp[iVictim] == true)
{
if (flDamage >= 100.0)
{
client_cmd(iVictim, "spk ^"fvox/(p160) boop, boop, boop, (p100) blood_loss, (p140) boop, boop, boop, (p100) wound_sterilized, blip(p130 v50), blip(p130 v40), hiss, morphine_shot^"")
suit_next(iVictim, 30.0) /* HEV Suit isn't allowed to talk next 30 seconds */
}
return HAM_IGNORED
}
if (iDamageBits & DMG_SLASH && hevtemp[iVictim] == true)
{
client_cmd(iVictim, "spk ^"fvox/(p160) boop, boop, boop, (p100) %s_lacerations^"", flDamage >= 150.0 ? "major" : "minor")
suit_next(iVictim, 20.0) /* HEV Suit isn't allowed to talk next 20 seconds */
return HAM_IGNORED
}
if (iDamageBits & DMG_SONIC && hevtemp[iVictim] == true)
{
if (flDamage >= 150.0)
{
client_cmd(iVictim, "spk ^"fvox/(p160) boop, boop, boop, (p100) internal_bleeding^"")
suit_next(iVictim, 20.0) /* HEV Suit isn't allowed to talk next 20 seconds */
}
return HAM_IGNORED
}
if (iDamageBits & (DMG_POISON | DMG_PARALYZE) && hevtemp[iVictim] == true)
{
client_cmd(iVictim, "spk ^"fvox/(p160) boop, boop, boop, (p100) blood_toxins^"")
suit_next(iVictim, 30.0) /* HEV Suit isn't allowed to talk next 30 seconds */
return HAM_IGNORED
}
if (iDamageBits & DMG_ACID &&hevtemp[iVictim] == true)
{
client_cmd(iVictim, "spk ^"fvox/blip blip blip, chemical_detected^"")
suit_next(iVictim, 30.0) /* HEV Suit isn't allowed to talk next 30 seconds */
return HAM_IGNORED
}
if (iDamageBits & DMG_NERVEGAS && hevtemp[iVictim] == true)
{
client_cmd(iVictim, "spk ^"fvox/blip blip blip, biohazard_detected^"")
suit_next(iVictim, 30.0) /* HEV Suit isn't allowed to talk next 30 seconds */
return HAM_IGNORED
}
if (iDamageBits & DMG_RADIATION && hevtemp[iVictim] == true)
{
client_cmd(iVictim, "spk ^"fvox/blip blip blip, radiation_detected^"")
suit_next(iVictim, 30.0) /* HEV Suit isn't allowed to talk next 30 seconds */
return HAM_IGNORED
}
if (iDamageBits & (DMG_DROWN | DMG_BURN) && hevtemp[iVictim] == true)
{
client_cmd(iVictim, "spk ^"fvox/(p140) beep, beep, (p100) health_dropping2, evacuate_area^"")
suit_next(iVictim, 20.0) /* HEV Suit isn't allowed to talk next 20 seconds */
return HAM_IGNORED
}
return HAM_IGNORED
}
public weapons(id) /* Is user out of ammo? */
{
new Weapon = read_data(2)
new Ammo = read_data(3)
if (curweap[id][0] != Weapon)
{
curweap[id][0] = Weapon
curweap[id][1] = Ammo
return PLUGIN_CONTINUE
}
if (curweap[id][1] < Ammo)
{
curweap[id][1] = Ammo
return PLUGIN_CONTINUE
}
if (curweap[id][1] == Ammo)
return PLUGIN_CONTINUE
curweap[id][1] = Ammo
curweap[id][0] = Weapon
new Bpammo = cs_get_user_bpammo(id, Weapon)
if (Ammo == 0 && Bpammo == 0 && hevtemp[id] == true)
{
client_cmd(id, "spk ^"fvox/blip ammo_depleted^"")
suit_next(id, 5.0)
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
public hevtemp_on(id) /* HEV Suit is now allowed to talk */
{
hevtemp[id] = true
}