Vehicle Knife Sound Fix 2017
[ · Download from mirror () ]22-06-2017, 5:13 PM
Vehicle Knife Sound Fix

 


 

This plugin fixes the bug, that when you are trying to knife a vehicle, that it no more sounds like hitting a player.
 
SMA

#include <amxmodx>

#include <fakemeta>

#include <hamsandwich>

 

new g_iMaxPlayers, g_iFhEmitSound

#define IsPlayer(%0) (1 <= %0 <= g_iMaxPlayers)

 

public plugin_init()

{

register_plugin("Vehicle Knife Sound Fix", "1.0", "KayDee")

register_cvar("@VehicleKnifeSoundFix", "1.0", FCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED)

if(engfunc(EngFunc_FindEntityByString, -1, "classname", "func_vehicle"))

{

RegisterHam(Ham_TraceAttack, "func_vehicle", "Vehicle_TraceAttack", 1)

g_iMaxPlayers = get_maxplayers()

}

}

 

public Vehicle_TraceAttack(iVictim, iAttacker)

{

if(IsPlayer(iAttacker) && get_user_weapon(iAttacker) == CSW_KNIFE)

{

g_iFhEmitSound = register_forward(FM_EmitSound, "Fm_EmitSound", 0)

}

}

 

public Fm_EmitSound(iEnt, iChannel)

{

emit_sound(iEnt, iChannel, "weapons/knife_hitwall1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)

unregister_forward(FM_EmitSound, g_iFhEmitSound, 0)

return FMRES_SUPERCEDE

}

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE

*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang2055\\ f0\\ fs16 \n\\ par }

*/

Category: Plugins CS 1.6 | Added by: spk_olle | Tags: plugins, plugins cs, addons cs1.6, cs16, Gungame, Counter-Strike Deathmatch 2.1, cs1.6, Gun-Game, counter-strike, download cs1.6
Views: 704 | Downloads: 310 | Rating: 0.0/0
Total comments: 0
avatar