Nie ma tego dźwięku na serwerze, kiedyś używałem pluginów do blokowania 'E'
#include <amxmodx>
#include <fakemeta>
#define VERSION "0.3"
new const useSound[ ] = "common/wpn_denyselect.wav";
public plugin_init( )
{
register_plugin( "USE Sound Blocker", VERSION, "3Di" );
register_forward( FM_EmitSound, "handleSound" );
}
public handleSound( id, Channel, defaultSound[ ] )
{
if ( equal ( defaultSound, useSound ) )
{
static iButtons, iButtonsCheck;
iButtons = get_uc( 0, UC_Buttons );
iButtonsCheck = pev( id, pev_oldbuttons );
if ( ( iButtons & IN_USE ) && !( iButtonsCheck & IN_USE ) )
{
client_print( id, print_chat , "* 'USE' Sound Blocked *" );
}
return FMRES_SUPERCEDE;
}
return FMRES_IGNORED;
}
W późniejszym czasie wrzuciłem ten kod do spadochronu powstało
#include <amxmodx>
#include <reapi>
#define get_bit(%1,%2) (%1 & (1 << (%2 & 31)))
#define set_bit(%1,%2) %1 |= (1 << (%2 & 31))
#define clr_bit(%1,%2) %1 &= ~(1 << (%2 & 31))
new g_bitAlive;
const Float:fall_speed = -100.0
public plugin_init(){
register_plugin("Parachute Lite [ReAPI]", "11.0", "Leo_[BH]");
RegisterHookChain(RG_CBasePlayer_Spawn, "RG_Spawn_Post", 1);
RegisterHookChain(RG_CBasePlayer_Killed, "RG_Player_Killed", 0);
RegisterHookChain(RG_CBasePlayer_PreThink, "RG_client_PreThink");
}
public RG_Spawn_Post(id) if(is_user_alive(id)) set_bit(g_bitAlive, id);
public RG_Player_Killed(id) clr_bit(g_bitAlive, id);
public RG_client_PreThink(id){
if(!get_bit(g_bitAlive, id)) return;
if (get_entvar(id, var_gravity) == 0.1) set_entvar(id, var_gravity, 1.0);
if (get_entvar(id, var_button) & IN_USE) {
static Float:velocity[3]
get_entvar(id, var_velocity, velocity);
if (velocity[2] < 0.0) {
set_entvar(id, var_gravity, 0.1);
velocity[2] = (velocity[2] + 40.0 < fall_speed) ? velocity[2] + 40.0 : fall_speed ;
set_entvar(id, var_velocity, velocity);
}
}
else if ((get_entvar(id, var_oldbuttons) & IN_USE)) {
set_entvar(id, var_gravity, 1.0);
}
}
#if AMXX_VERSION_NUM < 183
public client_disconnect(id) clr_bit(g_bitAlive, id);
#else
public client_disconnected(id) clr_bit(g_bitAlive, id);
#endif
Aktualnie używany kod - dekompilator, bo kod źródłowy gdzieś leży w plikach
#pragma semicolon 1
#pragma ctrlchar '\'
new g_bitAlive;
bool:operator<(Float:,Float:)(Float:oper1, Float:oper2)
{
return 0 > floatcmp(oper1, oper2);
}
public __reapi_version_check(majorVersion, minorVersion)
{
if (majorVersion != 5)
{
new temp[512];
formatex(temp, 511, "[ReAPI]: Api major version mismatch; expected %d, real %d", 5, majorVersion);
set_fail_state(temp);
return 0;
}
if (minorVersion < 2)
{
new temp[512];
formatex(temp, 511, "[ReAPI]: Api minor version mismatch; expected at least %d, real %d", 2, minorVersion);
set_fail_state(temp);
return 0;
}
return 0;
}
public plugin_init()
{
register_plugin("Parachute Lite [ReAPI]", "11.0", "Leo_[BH]");
RegisterHookChain(3072, "RG_Spawn_Post", "");
RegisterHookChain(3079, "RG_Player_Killed", 0);
RegisterHookChain(3088, "RG_client_PreThink", 0);
return 0;
}
public RG_Spawn_Post(id)
{
if (is_user_alive(id))
{
g_bitAlive = 1 << id & 31 | g_bitAlive;
}
return 0;
}
public RG_Player_Killed(id)
{
g_bitAlive = ~1 << id & 31 & g_bitAlive;
return 0;
}
public RG_client_PreThink(id)
{
!!! Removed Phi
if (!1 << id & 31 & g_bitAlive)
{
return 0;
}
if (get_entvar(id, 5157) == 0.10/*1036831949*/)
{
set_entvar(id, 5157, 1.00/*1065353216*/);
}
if (get_entvar(id, 5178) & 32)
{
static Float:velocity[3];
get_entvar(id, 5124, velocity);
if (velocity[2][0] < 0.00)
{
set_entvar(id, 5157, 0.10/*1036831949*/);
new var1;
if (velocity[2][0] + 40.00 < -100.00/*-1027080192*/)
{
var1 = velocity[2][0] + 40.00;
}
else
{
var1 = -100.00/*-1027080192*/;
}
velocity[2] = var1;
set_entvar(id, 5124, velocity);
}
}
else
{
if (get_entvar(id, 5225) & 32)
{
set_entvar(id, 5157, 1.00/*1065353216*/);
}
}
return 0;
}
public client_disconnect(id)
{
g_bitAlive = ~1 << id & 31 & g_bitAlive;
return 0;
}
Mimo to dźwięk use - wpn_denyselect , nie pojawia się w grze przy rozplantowywaniu C4 przez CT , gdzie jest winowajca? Plik do pobrania http://files.hldm.or.../sound/common/


Dodatki SourceMod




Moja zawartość
Mężczyzna