AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Anty retry for bh (https://forums.alliedmods.net/showthread.php?t=342469)

JuanitoAlimana 04-16-2023 02:25

Anty retry for bh
 
Hi! I have a biohazard server, I'm using this mod:
https://forums.alliedmods.net/showthread.php?t=68523

The problem is that when a user gets infected they can respawn as humans if they type retry in the console or they rejoin the server. Is there a way to block this, or use amx_infect on those who rejoined the server if they were already infected during the round?

Some trolls are just killing the mod by rejoining time and time again.

Thanks!

JocAnis 04-16-2023 10:56

Re: Anty retry for bh
 
can you test this, im using amx_infect "name" command, original code by ConnorMcLeon: https://forums.alliedmods.net/showthread.php?p=555695

so i edited to infect player who used retry on his new spawn:
Code:

#include <amxmodx>
#include <fakemeta>

/****** Customization Area ******/
// Flag to allow admin to reconnect without hudmessage
// This is usefull when you reconnect with another nick to watch a suspected cheater
// This will still set back your score/money/...
#define ADMIN_SILENT ADMIN_KICK

// Color for hud message
#define RED        0
#define GREEN        100
#define BLUE        200
/********************************/

#define PLUGIN "Reconnect Features"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.2.4 BETA"

#define MAX_PLAYERS        32
#define MAX_STORED        64

#define OFFSET_CSMONEY        115
#define OFFSET_CSDEATHS        444

#define TASK_KILL        1946573517
#define TASK_CLEAR        2946573517
#define TASK_PLAYER 3946573517


enum Storage {
        StoreSteamId[20],
        StoreFrags,
        StoreDeaths,
        StoreMoney,
        StoreRound
}

new g_CurInfos[MAX_PLAYERS+1][Storage]
new g_StoredInfos[MAX_STORED][Storage]

new bool:g_bPlayerNonSpawnEvent[MAX_PLAYERS + 1]
new g_iFwFmClientCommandPost

new g_iRoundNum

new g_pcvarTime, g_pcvarScore, g_pcvarMoney, g_pcvarSpawn, g_pcvarStartMoney, g_pcvarNotify
new mp_startmoney
new g_msgidDeathMsg
new g_iMaxPlayers

new bool: g_bMustBeInfected[ 33 ]

public plugin_init()
{
        register_plugin(PLUGIN, VERSION, AUTHOR)
        register_dictionary("reconnect.txt")

        register_cvar("reconnect_features", VERSION, FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY)
        g_pcvarTime = register_cvar("amx_noreconnect_time", "45")
        g_pcvarScore = register_cvar("amx_noreconnect_score", "1")
        g_pcvarMoney = register_cvar("amx_noreconnect_money", "1")
        g_pcvarSpawn = register_cvar("amx_noreconnect_spawn", "1")
        g_pcvarStartMoney = register_cvar("amx_noreconnect_startmoney", "0")
        g_pcvarNotify = register_cvar("amx_noreconnect_notify", "1")

        register_event("HLTV", "eNewRound", "a", "1=0", "2=0")

        register_event("TextMsg", "eRestart", "a", "2&#Game_C", "2&#Game_w")

        register_event("ResetHUD", "Event_ResetHUD", "b")
        register_event("TextMsg", "Event_TextMsg_GameWillRestartIn", "a", "2=#Game_will_restart_in")
        register_clcmd("fullupdate", "ClientCommand_fullupdate")

        register_event("Money", "eMoney", "be")
        register_event("ScoreInfo", "eScoreInfo", "a")
}

public plugin_cfg()
{
        mp_startmoney = get_cvar_pointer("mp_startmoney")
        g_msgidDeathMsg = get_user_msgid("DeathMsg")
        g_iMaxPlayers = global_get(glb_maxClients)
}

public Event_TextMsg_GameWillRestartIn()
{
        static id
        for(id = 1; id <= g_iMaxPlayers; ++id)
                if( is_user_alive(id) )
                        g_bPlayerNonSpawnEvent[id] = true
}

public ClientCommand_fullupdate(id)
{
        g_bPlayerNonSpawnEvent[id] = true
        static const szClientCommandPost[] = "Forward_ClientCommand_Post"
        g_iFwFmClientCommandPost = register_forward(FM_ClientCommand, szClientCommandPost, 1)
        return PLUGIN_CONTINUE
}

public Forward_ClientCommand_Post(id)
{
        unregister_forward(FM_ClientCommand, g_iFwFmClientCommandPost, 1)
        g_bPlayerNonSpawnEvent[id] = false
        return FMRES_HANDLED
}

public Event_ResetHUD(id)
{
        if (!is_user_alive(id))
                return

        if (g_bPlayerNonSpawnEvent[id])
        {
                g_bPlayerNonSpawnEvent[id] = false
                return
        }

        Forward_PlayerSpawn(id)
}

Forward_PlayerSpawn(id)
{
        if(g_CurInfos[id][StoreRound] == g_iRoundNum)
        {
                g_CurInfos[id][StoreRound] = 0
                set_task(0.1, "task_delay_kill", id+TASK_KILL)
        }
}

public task_delay_kill(id)
{
        id -= TASK_KILL
        if( g_bMustBeInfected[ id ] )
        {
                new name[ 32 ]
                get_user_name( id, name, charsmax( name ) )
                server_cmd( "amx_infect ^"%s^"", name )
                g_bMustBeInfected[ id ] = false
                client_print( 0, print_chat, "[Info] %s did a retry, should be infected!", name )
        }
}

public eMoney(id)
{
        g_CurInfos[id][StoreMoney] = read_data(1)
}

public eScoreInfo()
{
        new id = read_data(1)
        if(!(1<= id <= g_iMaxPlayers))
                return

        g_CurInfos[id][StoreFrags] = read_data(2)
        g_CurInfos[id][StoreDeaths] = read_data(3)
}

public eRestart()
{
        for(new i; i < MAX_STORED; i++)
        {
                remove_task(i+TASK_CLEAR)
                remove_task(i+TASK_PLAYER)
                g_StoredInfos[i][StoreSteamId][0] = 0
        }
}

public eNewRound()
{
        g_iRoundNum++
}

public client_disconnected(id)
{
        if(is_user_bot(id) || is_user_hltv(id))
        {
                return
        }

        new Float:fTaskTime = get_pcvar_float(g_pcvarTime)
        if(!fTaskTime)
                return

        static iFree
        for(iFree = 0; iFree <= MAX_STORED; iFree++)
        {
                if(iFree == MAX_STORED)
                {
                        return
                }
                if(!g_StoredInfos[iFree][StoreSteamId][0])
                        break
        }

        copy(g_StoredInfos[iFree][StoreSteamId], 19, g_CurInfos[id][StoreSteamId])
        g_StoredInfos[iFree][StoreFrags] = g_CurInfos[id][StoreFrags]
        g_StoredInfos[iFree][StoreDeaths] = g_CurInfos[id][StoreDeaths]
        g_StoredInfos[iFree][StoreMoney] = g_CurInfos[id][StoreMoney]
        g_StoredInfos[iFree][StoreRound] = g_iRoundNum

        g_CurInfos[id][StoreSteamId][0] = 0
        g_CurInfos[id][StoreFrags] = 0
        g_CurInfos[id][StoreDeaths] = 0
        g_CurInfos[id][StoreMoney] = 0
        g_CurInfos[id][StoreRound] = 0

        set_task(fTaskTime, "task_clear", iFree+TASK_CLEAR)
}

public task_clear(iTaskId)
{
        iTaskId -= TASK_CLEAR
        g_StoredInfos[iTaskId][StoreSteamId][0] = 0
}

public client_putinserver(id)
{
        if(is_user_bot(id) || is_user_hltv(id))
                return

        g_bPlayerNonSpawnEvent[id] = false

        static szSteamId[20]
        get_user_authid(id, szSteamId, 19)
        copy(g_CurInfos[id][StoreSteamId], 19, szSteamId)

        for(new i; i < MAX_STORED; i++)
        {
                if(!g_StoredInfos[i][StoreSteamId][0])
                        continue

                if( equal(g_StoredInfos[i][StoreSteamId], szSteamId, strlen(szSteamId)) )
                {
                        remove_task(id+TASK_PLAYER)

                        g_StoredInfos[i][StoreSteamId][0] = 0

                        g_bMustBeInfected[ i ] = true
                        return
                }
        }
        g_CurInfos[id][StoreRound] = -1
}

public task_print_player(id)
{
        if(is_user_connected(id -= TASK_PLAYER))
        {
                static szText[128]
                new n = formatex(szText, 127, "** [Reconnect Features] %L", id, "RF_PLAYER_PRINT")
                if(get_pcvar_num(g_pcvarScore))
                        n += formatex(szText[n], 127 - n, " %L", id, "RF_SCORE")
                if(get_pcvar_num(g_pcvarMoney))
                        n += formatex(szText[n], 127 - n, " %L", id, "RF_MONEY")
                client_print(id, print_chat, szText)
        }
}


JuanitoAlimana 04-16-2023 18:46

Re: Anty retry for bh
 
Didn't work, player that does retry doesn't get infected on reentry

JocAnis 04-17-2023 12:23

Re: Anty retry for bh
 
ok code edited, it will print now chat info if player did retry. test it firstly, so we will know which plugin causes error

mlibre 04-19-2023 12:50

Re: Anty retry for bh
 
PHP Code:

//#define RUN_CMD    //enable to run command X on spawn

#include <amxmodx>

#if AMXX_VERSION_NUM < 183
    #define MAX_PLAYERS 32
    #define MAX_NAME_LENGTH 32
    #define MAX_IP_LENGTH 16
    #define MAX_AUTHID_LENGTH 64
    #define MAX_USER_INFO_LENGTH 256
#endif

#if defined RUN_CMD
#include <hamsandwich>

new bool:is_user_retry[MAX_PLAYERS 1]
#else
new g_pWaitg_pMsg
#endif

#define PLUGIN "s!mple anti-retry"
#define VERSION "3.6e"
#define AUTHOR "mlibre"

new Trie:g_Idg_pImmunityg_pType

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
g_Id TrieCreate()
    
    
g_pImmunity register_cvar("antiretry_immunity""0"//<-admin flag "u" omitted
    
g_pType register_cvar("antiretry_type""1"//obtain->authid=1 / ip=2 or name=3
    
    #if !defined RUN_CMD
    
g_pWait register_cvar("antiretry_wait""60"//<-seconds waiting to reconnect...
    
g_pMsg register_cvar("antiretry_msg""wait %d segs for reconnect!"//<-msg show to the player when being kicked NOTE: "%d" return num segs
    #else
        #if AMXX_VERSION_NUM < 183
        
RegisterHam(Ham_Spawn"player""Ham_SpawnPlayer_Post"true)
        
#else
        
RegisterHamPlayer(Ham_Spawn"Ham_SpawnPlayer_Post"true)
        
#endif
    #endif
}

public 
plugin_end() TrieDestroy(g_Id)

public 
client_putinserver(id)
{
    if(
is_user_bot(id) || is_user_hltv(id))
        return
    
    if(
get_pcvar_num(g_pImmunity) && get_user_flags(id) & ADMIN_MENU)
        return
    
    new 
authid[MAX_AUTHID_LENGTH], ip[MAX_IP_LENGTH], nick[MAX_NAME_LENGTH]
    
    switch(
clamp(get_pcvar_num(g_pType), 13))
    {
        case 
1
        {
            
get_user_authid(idauthidcharsmax(authid))
            
            if(
containi(authid"_ID") != -1
            {
                
get_user_name(idnickcharsmax(nick))
                
                
log_amx("** WARNING! ^"%s^" there will be conflict, we change to get the name instead."authid)
                
                
set_pcvar_num(g_pType3)
            }
        }
        case 
2get_user_ip(idipcharsmax(ip), 1)
        case 
3get_user_name(idnickcharsmax(nick))
    }
    
    
#if !defined RUN_CMD
    
static iTimestampiTimestamp get_systime()
    
#endif
    
    
if( !TrieKeyExists(g_Idget_pcvar_num(g_pType) == authid get_pcvar_num(g_pType) == ip encode(nick)) )
    {
        
#if !defined RUN_CMD
        
TrieSetCell(g_Idget_pcvar_num(g_pType) == authid get_pcvar_num(g_pType) == ip encode(nick), iTimestamp get_pcvar_num(g_pWait))
        
#else
        
TrieSetCell(g_Idget_pcvar_num(g_pType) == authid get_pcvar_num(g_pType) == ip encode(nick), 1)
        
#endif
    
}
    else 
    {
        
#if !defined RUN_CMD
        
new get_user_wait
        
        TrieGetCell
(g_Idget_pcvar_num(g_pType) == authid get_pcvar_num(g_pType) == ip encode(nick), get_user_wait)
        
        if(
get_user_wait iTimestamp)
        {
            new 
setMsg[MAX_USER_INFO_LENGTH]; get_pcvar_string(g_pMsgsetMsgcharsmax(setMsg))
            
            
formatex(setMsgcharsmax(setMsg), setMsgget_user_wait iTimestamp)
            
            
server_cmd("kick #%d ^"%s^""get_user_userid(id), setMsg)
        }
        else
        {
            
TrieDeleteKey(g_Idget_pcvar_num(g_pType) == authid get_pcvar_num(g_pType) == ip encode(nick))
            
            
TrieSetCell(g_Idget_pcvar_num(g_pType) == authid get_pcvar_num(g_pType) == ip encode(nick), iTimestamp get_pcvar_num(g_pWait))
        }
        
#else
        
is_user_retry[id] = true
        
#endif
    
}
}

stock encode(const str[])
{
    new 
buffer[34]
    
#if AMXX_VERSION_NUM < 183
    
md5(strbuffer)
    
#else
    
hash_string(strHash_Md5buffercharsmax(buffer))
    
#endif
    
    
return buffer
}

#if defined RUN_CMD
public Ham_SpawnPlayer_Post(const id
{
    if(
is_user_retry[id] && is_user_alive(id))
    {
        
server_cmd("amx_infect #%d"get_user_userid(id))
        
        
is_user_retry[id] = false
    
}
}
#endif 


JuanitoAlimana 04-19-2023 14:18

Re: Anty retry for bh
 
Quote:

Originally Posted by mlibre (Post 2803072)
PHP Code:

#include <amxmodx>

#define PLUGIN "simple anti-retry"
#define VERSION "1.0"
#define AUTHOR "mlibre"

enum _:rtr
{
    
is_user_retry
    
g_count_retry 
}

new 
g_retry[33][rtr]

const 
max_retry 5

const time_ban 10

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
}

public 
client_putinserver(id)
{
    if(
get_user_flags(id) & ADMIN_MENU) return    //is admin not apply!
        
    
if(g_retry[id][is_user_retry])
    {
        
g_retry[id][g_count_retry]++
        
        if(
g_retry[id][g_count_retry] == max_retry)
        {
            new 
ip[32], authid[32]
            
get_user_ip(idipcharsmax(ip), 1)
            
get_user_authid(idauthidcharsmax(authid))
            
            
g_retry[id][is_user_retry] = 0
            g_retry
[id][g_count_retry] = 0
            
            server_cmd
("kick #%d ^"you have been banned for reconnecting more than %d times!^";wait;banid %d %s;writeid;wait;addip %d %s;wait;writeip"get_user_userid(id), max_retrytime_banauthidtime_banip)
            
            return
        }
        
        
server_cmd("kick #%d ^"reconnect %d of %d, if you reach the limit you will be bannedwait for the map change!^""get_user_userid(id), g_retry[id][g_count_retry], max_retry)
        
        return
    }
    
    
g_retry[id][is_user_retry] = 1



Did you even read what I'm asking for

DruGzOG 04-19-2023 18:43

Re: Anty retry for bh
 
PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <biohazard>

/****** Customization Area ******/
// Flag to allow admin to reconnect without hudmessage
// This is usefull when you reconnect with another nick to watch a suspected cheater
// This will still set back your score/money/...
#define ADMIN_SILENT ADMIN_KICK

// Color for hud message
#define RED    0
#define GREEN    100
#define BLUE    200
/********************************/

#define PLUGIN "Reconnect Features"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.2.4 BETA"

#define MAX_PLAYERS    32
#define MAX_STORED     64

#define OFFSET_CSMONEY    115
#define OFFSET_CSDEATHS    444

#define TASK_KILL    1946573517
#define TASK_CLEAR    2946573517
#define TASK_PLAYER 3946573517


enum Storage {
    
StoreSteamId[20],
    
StoreFrags,
    
StoreDeaths,
    
StoreMoney,
    
StoreRound
}

new 
g_CurInfos[MAX_PLAYERS+1][Storage]
new 
g_StoredInfos[MAX_STORED][Storage]

new 
bool:g_bPlayerNonSpawnEvent[MAX_PLAYERS 1]
new 
g_iFwFmClientCommandPost

new g_iRoundNum

new g_pcvarTimeg_pcvarScoreg_pcvarMoneyg_pcvarSpawng_pcvarStartMoneyg_pcvarNotify
new mp_startmoney
new g_msgidDeathMsg
new g_iMaxPlayers

new boolg_bMustBeInfected33 ]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_dictionary("reconnect.txt")

    
register_cvar("reconnect_features"VERSIONFCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY)
    
g_pcvarTime register_cvar("amx_noreconnect_time""45")
    
g_pcvarScore register_cvar("amx_noreconnect_score""1")
    
g_pcvarMoney register_cvar("amx_noreconnect_money""1")
    
g_pcvarSpawn register_cvar("amx_noreconnect_spawn""1")
    
g_pcvarStartMoney register_cvar("amx_noreconnect_startmoney""0")
    
g_pcvarNotify register_cvar("amx_noreconnect_notify""1")

    
register_event("HLTV""eNewRound""a""1=0""2=0")

    
register_event("TextMsg""eRestart""a""2&#Game_C""2&#Game_w")

    
register_event("ResetHUD""Event_ResetHUD""b")
    
register_event("TextMsg""Event_TextMsg_GameWillRestartIn""a""2=#Game_will_restart_in")
    
register_clcmd("fullupdate""ClientCommand_fullupdate")

    
register_event("Money""eMoney""be")
    
register_event("ScoreInfo""eScoreInfo""a")
}

public 
Event_TextMsg_GameWillRestartIn()
{
    static 
id
    
for(id 1id <= g_iMaxPlayers; ++id)
        if( 
is_user_alive(id) )
            
g_bPlayerNonSpawnEvent[id] = true
}

public 
ClientCommand_fullupdate(id)
{
    
g_bPlayerNonSpawnEvent[id] = true
    
static const szClientCommandPost[] = "Forward_ClientCommand_Post"
    
g_iFwFmClientCommandPost register_forward(FM_ClientCommandszClientCommandPost1)
    return 
PLUGIN_CONTINUE
}

public 
Forward_ClientCommand_Post(id)
{
    
unregister_forward(FM_ClientCommandg_iFwFmClientCommandPost1)
    
g_bPlayerNonSpawnEvent[id] = false
    
return FMRES_HANDLED
}

public 
Event_ResetHUD(id)
{
    if (!
is_user_alive(id))
        return

    if (
g_bPlayerNonSpawnEvent[id])
    {
        
g_bPlayerNonSpawnEvent[id] = false
        
return
    }

    
Forward_PlayerSpawn(id)
}

Forward_PlayerSpawn(id)
{
    if(
g_CurInfos[id][StoreRound] == g_iRoundNum)
    {
        
g_CurInfos[id][StoreRound] = 0
        set_task
(0.1"task_delay_kill"id+TASK_KILL)
    }
}

public 
task_delay_kill(id)
{
    
id -= TASK_KILL
    
if( g_bMustBeInfectedid ] )
    {
        new 
name32 ]
        
get_user_nameidnamecharsmaxname ) )
        
infect_user (idid)
        
g_bMustBeInfectedid ] = false
        client_print
0print_chat"[Info] %s did a retry, should be infected!"name )
    }
}

public 
eMoney(id)
{
    
g_CurInfos[id][StoreMoney] = read_data(1)
}

public 
eScoreInfo()
{
    new 
id read_data(1)
    if(!(
1<= id <= g_iMaxPlayers))
        return

    
g_CurInfos[id][StoreFrags] = read_data(2)
    
g_CurInfos[id][StoreDeaths] = read_data(3)
}

public 
eRestart()
{
    for(new 
iMAX_STOREDi++)
    {
        
remove_task(i+TASK_CLEAR)
        
remove_task(i+TASK_PLAYER)
        
g_StoredInfos[i][StoreSteamId][0] = 0
    
}
}

public 
eNewRound()
{
    
g_iRoundNum++
}

public 
client_disconnected(id)
{
    if(
is_user_bot(id) || is_user_hltv(id))
    {
        return
    }

    new 
Float:fTaskTime get_pcvar_float(g_pcvarTime)
    if(!
fTaskTime)
        return

    static 
iFree
    
for(iFree 0iFree <= MAX_STOREDiFree++)
    {
        if(
iFree == MAX_STORED)
        {
            return
        }
        if(!
g_StoredInfos[iFree][StoreSteamId][0])
            break
    }

    
copy(g_StoredInfos[iFree][StoreSteamId], 19g_CurInfos[id][StoreSteamId])
    
g_StoredInfos[iFree][StoreFrags] = g_CurInfos[id][StoreFrags]
    
g_StoredInfos[iFree][StoreDeaths] = g_CurInfos[id][StoreDeaths]
    
g_StoredInfos[iFree][StoreMoney] = g_CurInfos[id][StoreMoney]
    
g_StoredInfos[iFree][StoreRound] = g_iRoundNum

    g_CurInfos
[id][StoreSteamId][0] = 0
    g_CurInfos
[id][StoreFrags] = 0
    g_CurInfos
[id][StoreDeaths] = 0
    g_CurInfos
[id][StoreMoney] = 0
    g_CurInfos
[id][StoreRound] = 0

    set_task
(fTaskTime"task_clear"iFree+TASK_CLEAR)
}

public 
task_clear(iTaskId)
{
    
iTaskId -= TASK_CLEAR
    g_StoredInfos
[iTaskId][StoreSteamId][0] = 0
}

public 
client_putinserver(id)
{
    if(
is_user_bot(id) || is_user_hltv(id))
        return

    
g_bPlayerNonSpawnEvent[id] = false

    
static szSteamId[20]
    
get_user_authid(idszSteamId19)
    
copy(g_CurInfos[id][StoreSteamId], 19szSteamId)

    for(new 
iMAX_STOREDi++)
    {
        if(!
g_StoredInfos[i][StoreSteamId][0])
            continue

        if( 
equal(g_StoredInfos[i][StoreSteamId], szSteamIdstrlen(szSteamId)) )
        {
            
remove_task(id+TASK_PLAYER)

            
g_StoredInfos[i][StoreSteamId][0] = 0

            g_bMustBeInfected
] = true
            
return
        }
    }
    
g_CurInfos[id][StoreRound] = -1
}

public 
task_print_player(id)
{
    if(
is_user_connected(id -= TASK_PLAYER))
    {
        static 
szText[128]
        new 
formatex(szText127"** [Reconnect Features] %L"id"RF_PLAYER_PRINT")
        if(
get_pcvar_num(g_pcvarScore))
            
+= formatex(szText[n], 127 n" %L"id"RF_SCORE")
        if(
get_pcvar_num(g_pcvarMoney))
            
+= formatex(szText[n], 127 n" %L"id"RF_MONEY")
        
client_print(idprint_chatszText)
    }


Just utilized the infect_user means from the biohazard.inc instead of the infect user method above. Try this

mlibre 04-20-2023 09:02

Re: Anty retry for bh
 
Quote:

Originally Posted by JuanitoAlimana (Post 2803083)
Did you even read what I'm asking for

It is a temporary solution for the trool, in the same way it can be adapted to execute the infection command... try

PHP Code:

#include <amxmodx>
#include <hamsandwich>

new is_user_retry[33]

public 
plugin_init() {
    
RegisterHam(Ham_Spawn"player""getPlayerSpawn"1)
}

public 
client_putinserver(id)
{
    
is_user_retry[id]++
}

public 
getPlayerSpawn(const id
{
    if( !
is_user_alive(id) || !is_user_connected(id) ) 
        return
        
    if(
is_user_retry[id] >= 2)
    {
        
server_cmd("amx_infect #%d"get_user_userid(id))
    }



DruGzOG 04-20-2023 11:00

Re: Anty retry for bh
 
Quote:

Originally Posted by mlibre (Post 2803131)
It is a temporary solution for the trool, in the same way it can be adapted to execute the infection command... try

PHP Code:

#include <amxmodx>
#include <hamsandwich>

new is_user_retry[33]

public 
plugin_init() {
    
RegisterHam(Ham_Spawn"player""getPlayerSpawn"1)
}

public 
client_putinserver(id)
{
    
is_user_retry[id]++
}

public 
getPlayerSpawn(const id
{
    if( !
is_user_alive(id) || !is_user_connected(id) ) 
        return
        
    if(
is_user_retry[id] >= 2)
    {
        
server_cmd("amx_infect #%d"get_user_userid(id))
    }



Where in your plug-in are you checking if the player reconnected? There’s no check in this. :crab:

mlibre 04-20-2023 11:09

Re: Anty retry for bh
 
Quote:

Originally Posted by DruGzOG (Post 2803140)
Where in your plug-in are you checking if the player reconnected? There’s no check in this. :crab:

yes in a simplified way


All times are GMT -4. The time now is 00:51.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.