disable ambient_generic

Сообщения
21
Реакции
4
Because i don't want use fakemeta for 1 function, i'm check if it's only possibile using ReAPI
 
Сообщения
175
Реакции
45
Помог
2 раз(а)
Код:
#include <amxmodx>
#include <amxmisc>
#include <engine>

public plugin_precache() {
    remove_entity_name("ambient_generic");
}
 
Сообщения
21
Реакции
4
C++:
#include <amxmodx>
#include <reapi>

#define PLUGIN "DisableAmbient"
#define VERSION "1.0"
#define AUTHOR "PANDA"

new HookChain: g_ambient;

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    set_task(0.1, "offHook");
}

public plugin_precache() g_ambient=RegisterHookChain(RH_GetEntityInit, "sound", 1);
public offHook() DisableHookChain(g_ambient);

public sound(classname[]){
    if(contain(classname, "ambient_generic")!=-1){
        SetHookChainReturn(ATYPE_INTEGER, 0);
        return HC_SUPERCEDE;
    }
    return HC_CONTINUE;
}
this work fine
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу