Поиск Respawn func_breakable after broken

Сообщения
33
Реакции
14
Hello everyone!

I am looking for a plugin, which can respawn/regenerate func_breakable after being broken. Simple plugin, hopefully someone has it.

Thanks in advance!

Greetings!
 
Сообщения
225
Реакции
90
Помог
1 раз(а)
Используй на здоровье
C++:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include <reapi>

new g_pPrecacheSpawn;
new Array:g_aBreakebleEntity;

public plugin_init()
{
    unregister_forward(FM_Spawn, g_pPrecacheSpawn);
    register_clcmd("say /respawn", "redeploy_breakble_entity");
}

public plugin_precache()
{
    g_aBreakebleEntity = ArrayCreate();

    g_pPrecacheSpawn = register_forward(FM_Spawn, "FM_SpawnPrecache", false);
}

public FM_SpawnPrecache(iEnt)
{
    if(is_entity(iEnt))
    {
        static szClass[32];
        get_entvar(iEnt, var_classname, szClass, charsmax(szClass));
        if(equal(szClass, "func_breakable")) ArrayPushCell(g_aBreakebleEntity, iEnt);
    }
}

public redeploy_breakble_entity()
{
    static iTmp, iSize;
    iSize = ArraySize(g_aBreakebleEntity);
    for(new i = 0; i < iSize; ++i)
    {
        iTmp = ArrayGetCell(g_aBreakebleEntity, i);
        ExecuteHamB(Ham_CS_Restart, iTmp);
    }
}
 
Сообщения
33
Реакции
14
Very nice, thank you!
Is it possible to add task 300 seconds and if func_breakable is destroyed, then start this task of 300 seconds. For example: I break the entity, then the task starts from 300 and when 300 seconds are over, it respawns.

Thank you in advance!!!
 

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

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