O noua aventura incepe. LaLeagane - It's all about gaming!

2006 and still counting.

PLUGIN Plugin Anti-Entity Block

Senor LLG

Moderator
Joined
May 3, 2018
Messages
219
Reaction score
225
Age
17
Location
/var/tmp
Descriere : Acest plugin da slap celor care blocheza entitatile de pe harta
Se poate folosi pe urmatoarele moduri : DR, ZM, HNS, ZE, RESPAWN, BB (pe clasic nu ii vad rostul, dar il puteti folosi si acolo)

C++:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#include <fakemeta>

new Float:getFrame[33]

#define block_dmg 5 // daca blocheaza entitatea si slapul nu ajuta , ii va da dmg pe secunda , in cazul asta 5 dmg pe secunda

#define is_valid_player(%1) ( 1 <= %1 <= MAX_PLAYERS )
 
new const anti_block_func[][] =
{
    "func_train",
    "func_vehicle",
    "func_tracktrain"
}
 
new Float:takeLastFram[33]

enum _:Cvar
{
    var_one
}
new cfg[Cvar]
 
public plugin_init()
{
    register_plugin("ZE ANTIBLOCK", "1.0", "SenorAMXX")
    cfg[var_one] = register_cvar("ze_block_time_seconds", "1.0") // aici setati voti la cate secunde sa ii dea slap
 
    for (new i = 0; i <= charsmax(anti_block_func); i++)    RegisterHam(Ham_Blocked, anti_block_func[i], "fw_block_event", 1)
}
 
public fw_block_event(iEntity, id)
{
    if(is_valid_player(id))
    {
        new Float:flRefTime = get_gametime()
    
        if(is_user_alive(id) && pev_valid(iEntity))    getFrame[id] = get_gametime();

        if(takeLastFram[id] > flRefTime)    return
       
        takeLastFram[id] = flRefTime + get_pcvar_float(cfg[var_one])
           
        user_slap(id, block_dmg )

        client_print(id, print_center, "## STOP BLOCKING ##")
    }
}
 
shape1
shape2
shape3
shape4
shape5
shape6
Top