[set_task] Передача аргументов

Сообщения
775
Реакции
294
Помог
11 раз(а)
Подскажите как правильно передавать аргументы

Вот пример
Код:
public fbans_player_banned_pre(const id, const userid, const steamid[],
    const ip[], const name[], const admin_ip[],
    const admin_steamid[], const admin_name[], const ban_type[],
    const reason[], const bantime)
{
    if(!id || !is_user_connected(id) || get_user_userid(id)!=userid)    return PLUGIN_HANDLED;
    
    new szParametr[11];
    
    szParametr[0] = id;
    szParametr[1] = userid;
    szParametr[2] = steamid[id];
    szParametr[3] = ip[id];
    szParametr[4] = name[id];
    new AId = get_user_index(admin_name);
    szParametr[5] = admin_ip[AId];
    szParametr[6] = admin_steamid[AId];
    szParametr[7] = admin_name[AId];
    szParametr[8] = ban_type[id];
    szParametr[9] = reason[id];
    szParametr[10] = bantime;
    
    set_task(FB_INTERVAL * float(FB_SSNUM), "motd", id, szParametr, 11, "a", FB_SSNUM);
}
Код:
public motd(id, data[])   
{
    new const szAuthId = data[2];
    new const szIP = data[3];
    new const szBannedName = data[4];
    new const szAdminIp = data[5];
    new const szAmdinName = data[7];
    new const ban_type = data[8];
    new const szReason = data[9];
    new const szBanTime = data[10];
....
И компилятор начинает неистово ругаться на неправильное получение аргументов.

P.s. Конечно он сначала орал на неправильную передачу
 

Ayk

Сообщения
763
Реакции
479
Помог
19 раз(а)
Ты присваиваешь массив одной ячейке...

Создай Trie/Array/DataPack со всеми данными и передай только поинтер на коллекцию как число.
 
Сообщения
775
Реакции
294
Помог
11 раз(а)
@Mistrick,т.е. в моем случае передача не произошла
 
Сообщения
585
Реакции
1,006
Помог
18 раз(а)
maFFyoZZyk, вы отличаете строку от массива и массив строк от массива чисел?
Первое вы пытаетесь передать непонятный мусор, второе у вас неправильные аргументы в обработчике таска.
 

iPlague

♿️
Сообщения
230
Реакции
130
Помог
2 раз(а)
Код:
...
new parm_DoT[3];
    parm_DoT[0] = iCaster;
    parm_DoT[1] = iTarget;
    parm_DoT[2] = 1;

    // Start the ultimate DoT

    new TaskId = TASK_BURNING + iTarget;
    set_task(1.0, "BM_ULT_Immolate_DoT", TaskId, parm_DoT, 3);
   
    return PLUGIN_HANDLED;
}

public BM_ULT_Immolate_DoT(parm_DoT[3])
{
    new iCaster = parm_DoT[0];
    new iTarget = parm_DoT[1];
    new iCounter = parm_DoT[2];
...
 
Последнее редактирование:
Сообщения
775
Реакции
294
Помог
11 раз(а)
Попробовал после ваших советов и долгих мучений, но что-то у меня не выгорело

Код:
#include < amxmodx >
#include < amxmisc >
#include <reapi>
#include <sxgeo>

enum _: infoAdminAndBan
{
    szUSteamid[48],
    szUIp[32],
    szUName[64],
    szAIp[32],
    szASteamid[48],
    szAName[64],
    szUBanType[64],
    szUReason[128],
    szUBanTime[20]
};

forward fbans_player_banned_pre(const id, const userid, const steamid[],
    const ip[], const name[], const admin_ip[],
    const admin_steamid[], const admin_name[], const ban_type[],
    const reason[], const bantime);

public fbans_player_banned_pre(const id, const userid, const steamid[],
    const ip[], const name[], const admin_ip[],
    const admin_steamid[], const admin_name[], const ban_type[],
    const reason[], const bantime)
{
    if(!id || !is_user_connected(id) || get_user_userid(id)!=userid)   
        return PLUGIN_HANDLED;
    
    new aData[infoAdminAndBan];
    copy( aData[ szUSteamid ], charsmax( aData[ szUSteamid ] ) , steamid );
    copy( aData[ szUIp ], charsmax( aData[ szUIp ] ), ip );
    copy( aData[ szUName ], charsmax( aData[ szUName ] ) , name );
    copy( aData[ szAIp ], charsmax( aData[ szAIp ] ) , admin_ip );
    copy( aData[ szASteamid ], charsmax( aData[ szASteamid ] ) , admin_steamid );
    copy( aData[ szAName ], charsmax( aData[ szAName ] ) , admin_name );
    copy( aData[ szUBanType ], charsmax( aData[ szUBanType ] ) , ban_type );
    copy( aData[ szUReason ], charsmax( aData[ szUReason ] ) , reason );
    aData[ szUBanTime ] = bantime;

    log_to_file("forward.log", "User IP: %d", aData[ szUIp ] );
    log_to_file("forward.log", "User NAME: %s",  aData[ szUName ] );
    log_to_file("forward.log", "Admin IP: %d", aData[ szAIp ] );
    log_to_file("forward.log", "Admin Steam ID: %d", aData[ szASteamid ] );
    log_to_file("forward.log", "Admin Steam Name: %s", aData[ szAName ] );
    log_to_file("forward.log", "Admin Ban TYPE: %s", aData[ szUBanType ] );
    log_to_file("forward.log", "Ban Reason: %s", aData[ szUReason ] );
    log_to_file("forward.log", "Ban Time: %d",  aData[ szUBanTime ] );

    set_task_ex( 5.0, "Task_Motd", id, aData, sizeof( aData ), SetTask_Repeat, 5 );
    
    return PLUGIN_HANDLED;
}

public Task_Motd(aData[], id)   
{
    new sUSteamid[48], sUIp[32], sUName[64], sAIp[32], sASteamid[48], sAName[64], sUBanType[65], sUReason[128], sUBanTime[20]
    // sUBanTime = str_to_float(aData[ szUBanTime ]);
    copy( sUSteamid, charsmax( sUSteamid ) , aData[ szUSteamid ] );
    copy( sUIp, charsmax( sUIp ), aData[ szUIp ] );
    copy( sUName, charsmax( sUName ) ,  aData[ szUName ] );
    copy( sAIp, charsmax( sAIp ) , aData[ szAIp ] );
    copy( sASteamid, charsmax( sASteamid ) , aData[ szASteamid ] );
    copy( sAName, charsmax( sAName ) , aData[ szAName ] );
    copy( sUBanType, charsmax( sUBanType ) , aData[ szUBanType ] );
    copy( sUReason, charsmax( sUReason ) , aData[ szUReason ] );
    sUBanTime = aData[ szUBanTime ];
    log_to_file("forward.log", "User Steam ID: %d", aData[ szUSteamid ] );
    log_to_file("forward.log", "User IP: %d", aData[ szUIp ] );
    log_to_file("forward.log", "User NAME: %s",  aData[ szUName ] );
    log_to_file("forward.log", "Admin IP: %d", aData[ szAIp ] );
    log_to_file("forward.log", "Admin Steam ID: %d", aData[ szASteamid ] );
    log_to_file("forward.log", "Admin Steam Name: %s", aData[ szAName ] );
    log_to_file("forward.log", "Admin Ban TYPE: %s", aData[ szUBanType ] );
    log_to_file("forward.log", "Ban Reason: %s", aData[ szUReason ] );
    log_to_file("forward.log", "Ban Time: %d",  aData[ szUBanTime ] );
}
Код:
L 09/07/2021 - 22:16:58: Log file started (file "cstrike/addons/amxmodx/logs/forward.log") (game "cstrike") (amx "1.9.0.5271")
L 09/07/2021 - 22:16:58: User IP: 24
L 09/07/2021 - 22:16:58: User NAME: L 09/07/2021 - 22:16:58: Admin IP: 0
L 09/07/2021 - 22:16:58: Admin Steam ID: 24
L 09/07/2021 - 22:16:58: Admin Steam Name:
L 09/07/2021 - 22:16:58: Admin Ban TYPE: 
L 09/07/2021 - 22:16:58: Ban Reason: 
L 09/07/2021 - 22:16:58: Ban Time: 0
L 09/07/2021 - 22:17:03: User Steam ID: 24
L 09/07/2021 - 22:17:03: User IP: 24
L 09/07/2021 - 22:17:03: User NAME: L 09/07/2021 - 22:17:03: Admin IP: 0
L 09/07/2021 - 22:17:03: Admin Steam ID: 24
L 09/07/2021 - 22:17:03: Admin Steam Name:
L 09/07/2021 - 22:17:03: Admin Ban TYPE: 
L 09/07/2021 - 22:17:03: Ban Reason: 
L 09/07/2021 - 22:17:03: Ban Time: 0
L 09/07/2021 - 22:17:08: User Steam ID: 24
L 09/07/2021 - 22:17:08: User IP: 24
L 09/07/2021 - 22:17:08: User NAME: L 09/07/2021 - 22:17:08: Admin IP: 0
L 09/07/2021 - 22:17:08: Admin Steam ID: 24
L 09/07/2021 - 22:17:08: Admin Steam Name:
L 09/07/2021 - 22:17:08: Admin Ban TYPE: 
L 09/07/2021 - 22:17:08: Ban Reason: 
L 09/07/2021 - 22:17:08: Ban Time: 0
L 09/07/2021 - 22:17:13: User Steam ID: 24
L 09/07/2021 - 22:17:13: User IP: 24
L 09/07/2021 - 22:17:13: User NAME: L 09/07/2021 - 22:17:13: Admin IP: 0
L 09/07/2021 - 22:17:13: Admin Steam ID: 24
L 09/07/2021 - 22:17:13: Admin Steam Name:
L 09/07/2021 - 22:17:13: Admin Ban TYPE: 
L 09/07/2021 - 22:17:13: Ban Reason: 
L 09/07/2021 - 22:17:13: Ban Time: 0
L 09/07/2021 - 22:17:18: User Steam ID: 24
L 09/07/2021 - 22:17:18: User IP: 24
L 09/07/2021 - 22:17:18: User NAME: L 09/07/2021 - 22:17:18: Admin IP: 0
L 09/07/2021 - 22:17:18: Admin Steam ID: 24
L 09/07/2021 - 22:17:18: Admin Steam Name:
L 09/07/2021 - 22:17:18: Admin Ban TYPE: 
L 09/07/2021 - 22:17:18: Ban Reason: 
L 09/07/2021 - 22:17:18: Ban Time: 0
L 09/07/2021 - 22:17:23: User Steam ID: 24
L 09/07/2021 - 22:17:23: User IP: 24
L 09/07/2021 - 22:17:23: User NAME: L 09/07/2021 - 22:17:23: Admin IP: 0
L 09/07/2021 - 22:17:23: Admin Steam ID: 24
L 09/07/2021 - 22:17:23: Admin Steam Name:
L 09/07/2021 - 22:17:23: Admin Ban TYPE: 
L 09/07/2021 - 22:17:23: Ban Reason: 
L 09/07/2021 - 22:17:23: Ban Time: 0
L 09/07/2021 - 22:17:28: User Steam ID: 24
L 09/07/2021 - 22:17:28: User IP: 24
L 09/07/2021 - 22:17:28: User NAME: L 09/07/2021 - 22:17:28: Admin IP: 0
L 09/07/2021 - 22:17:28: Admin Steam ID: 24
L 09/07/2021 - 22:17:28: Admin Steam Name:
L 09/07/2021 - 22:17:28: Admin Ban TYPE: 
L 09/07/2021 - 22:17:28: Ban Reason: 
L 09/07/2021 - 22:17:28: Ban Time: 0
L 09/07/2021 - 22:17:33: User Steam ID: 24
L 09/07/2021 - 22:17:33: User IP: 24
L 09/07/2021 - 22:17:33: User NAME: L 09/07/2021 - 22:17:33: Admin IP: 0
L 09/07/2021 - 22:17:33: Admin Steam ID: 24
L 09/07/2021 - 22:17:33: Admin Steam Name:
L 09/07/2021 - 22:17:33: Admin Ban TYPE: 
L 09/07/2021 - 22:17:33: Ban Reason: 
L 09/07/2021 - 22:17:33: Ban Time: 0
L 09/07/2021 - 22:17:38: User Steam ID: 24
L 09/07/2021 - 22:17:38: User IP: 24
L 09/07/2021 - 22:17:38: User NAME: L 09/07/2021 - 22:17:38: Admin IP: 0
L 09/07/2021 - 22:17:38: Admin Steam ID: 24
L 09/07/2021 - 22:17:38: Admin Steam Name:
L 09/07/2021 - 22:17:38: Admin Ban TYPE: 
L 09/07/2021 - 22:17:38: Ban Reason: 
L 09/07/2021 - 22:17:38: Ban Time: 0
L 09/07/2021 - 22:17:43: User Steam ID: 24
L 09/07/2021 - 22:17:43: User IP: 24
L 09/07/2021 - 22:17:43: User NAME: L 09/07/2021 - 22:17:43: Admin IP: 0
L 09/07/2021 - 22:17:43: Admin Steam ID: 24
L 09/07/2021 - 22:17:43: Admin Steam Name:
L 09/07/2021 - 22:17:43: Admin Ban TYPE: 
L 09/07/2021 - 22:17:43: Ban Reason: 
L 09/07/2021 - 22:17:43: Ban Time: 0
L 09/07/2021 - 22:17:48: User Steam ID: 24
L 09/07/2021 - 22:17:48: User IP: 24
L 09/07/2021 - 22:17:48: User NAME: L 09/07/2021 - 22:17:48: Admin IP: 0
L 09/07/2021 - 22:17:48: Admin Steam ID: 24
L 09/07/2021 - 22:17:48: Admin Steam Name:
L 09/07/2021 - 22:17:48: Admin Ban TYPE: 
L 09/07/2021 - 22:17:48: Ban Reason: 
L 09/07/2021 - 22:17:48: Ban Time: 0
L 09/07/2021 - 22:17:53: User Steam ID: 24
L 09/07/2021 - 22:17:53: User IP: 24
L 09/07/2021 - 22:17:53: User NAME: L 09/07/2021 - 22:17:53: Admin IP: 0
L 09/07/2021 - 22:17:53: Admin Steam ID: 24
L 09/07/2021 - 22:17:53: Admin Steam Name:
L 09/07/2021 - 22:17:53: Admin Ban TYPE: 
L 09/07/2021 - 22:17:53: Ban Reason: 
L 09/07/2021 - 22:17:53: Ban Time: 0
L 09/07/2021 - 22:17:58: User Steam ID: 24
L 09/07/2021 - 22:17:58: User IP: 24
L 09/07/2021 - 22:17:58: User NAME: L 09/07/2021 - 22:17:58: Admin IP: 0
L 09/07/2021 - 22:17:58: Admin Steam ID: 24
L 09/07/2021 - 22:17:58: Admin Steam Name:
L 09/07/2021 - 22:17:58: Admin Ban TYPE: 
L 09/07/2021 - 22:17:58: Ban Reason: 
L 09/07/2021 - 22:17:58: Ban Time: 0
L 09/07/2021 - 22:18:03: User Steam ID: 24
L 09/07/2021 - 22:18:03: User IP: 24
L 09/07/2021 - 22:18:03: User NAME: L 09/07/2021 - 22:18:03: Admin IP: 0
L 09/07/2021 - 22:18:03: Admin Steam ID: 24
L 09/07/2021 - 22:18:03: Admin Steam Name:
L 09/07/2021 - 22:18:03: Admin Ban TYPE: 
L 09/07/2021 - 22:18:03: Ban Reason: 
L 09/07/2021 - 22:18:03: Ban Time: 0
L 09/07/2021 - 22:18:08: User Steam ID: 24
L 09/07/2021 - 22:18:08: User IP: 24
L 09/07/2021 - 22:18:08: User NAME: L 09/07/2021 - 22:18:08: Admin IP: 0
L 09/07/2021 - 22:18:08: Admin Steam ID: 24
L 09/07/2021 - 22:18:08: Admin Steam Name:
L 09/07/2021 - 22:18:08: Admin Ban TYPE: 
L 09/07/2021 - 22:18:08: Ban Reason: 
L 09/07/2021 - 22:18:08: Ban Time: 0
L 09/07/2021 - 22:18:13: User Steam ID: 24
L 09/07/2021 - 22:18:13: User IP: 24
L 09/07/2021 - 22:18:13: User NAME: L 09/07/2021 - 22:18:13: Admin IP: 0
L 09/07/2021 - 22:18:13: Admin Steam ID: 24
L 09/07/2021 - 22:18:13: Admin Steam Name:
L 09/07/2021 - 22:18:13: Admin Ban TYPE: 
L 09/07/2021 - 22:18:13: Ban Reason: 
L 09/07/2021 - 22:18:13: Ban Time: 0
L 09/07/2021 - 22:18:18: User Steam ID: 24
L 09/07/2021 - 22:18:18: User IP: 24
L 09/07/2021 - 22:18:18: User NAME: L 09/07/2021 - 22:18:18: Admin IP: 0
L 09/07/2021 - 22:18:18: Admin Steam ID: 24
L 09/07/2021 - 22:18:18: Admin Steam Name:
L 09/07/2021 - 22:18:18: Admin Ban TYPE: 
L 09/07/2021 - 22:18:18: Ban Reason: 
L 09/07/2021 - 22:18:18: Ban Time: 0
L 09/07/2021 - 22:18:23: User Steam ID: 24
L 09/07/2021 - 22:18:23: User IP: 24
L 09/07/2021 - 22:18:23: User NAME: L 09/07/2021 - 22:18:23: Admin IP: 0
L 09/07/2021 - 22:18:23: Admin Steam ID: 24
L 09/07/2021 - 22:18:23: Admin Steam Name:
L 09/07/2021 - 22:18:23: Admin Ban TYPE: 
L 09/07/2021 - 22:18:23: Ban Reason: 
L 09/07/2021 - 22:18:23: Ban Time: 0
L 09/07/2021 - 22:18:28: User Steam ID: 24
L 09/07/2021 - 22:18:28: User IP: 24
L 09/07/2021 - 22:18:28: User NAME: L 09/07/2021 - 22:18:28: Admin IP: 0
L 09/07/2021 - 22:18:28: Admin Steam ID: 24
L 09/07/2021 - 22:18:28: Admin Steam Name:
L 09/07/2021 - 22:18:28: Admin Ban TYPE: 
L 09/07/2021 - 22:18:28: Ban Reason: 
L 09/07/2021 - 22:18:28: Ban Time: 0
L 09/07/2021 - 22:18:33: User Steam ID: 24
L 09/07/2021 - 22:18:33: User IP: 24
L 09/07/2021 - 22:18:33: User NAME: L 09/07/2021 - 22:18:33: Admin IP: 0
L 09/07/2021 - 22:18:33: Admin Steam ID: 24
L 09/07/2021 - 22:18:33: Admin Steam Name:
L 09/07/2021 - 22:18:33: Admin Ban TYPE: 
L 09/07/2021 - 22:18:33: Ban Reason: 
L 09/07/2021 - 22:18:33: Ban Time: 0
L 09/07/2021 - 22:18:38: User Steam ID: 24
L 09/07/2021 - 22:18:38: User IP: 24
L 09/07/2021 - 22:18:38: User NAME: L 09/07/2021 - 22:18:38: Admin IP: 0
L 09/07/2021 - 22:18:38: Admin Steam ID: 24
L 09/07/2021 - 22:18:38: Admin Steam Name:
L 09/07/2021 - 22:18:38: Admin Ban TYPE: 
L 09/07/2021 - 22:18:38: Ban Reason: 
L 09/07/2021 - 22:18:38: Ban Time: 0
L 09/07/2021 - 22:18:43: User Steam ID: 24
L 09/07/2021 - 22:18:43: User IP: 24
L 09/07/2021 - 22:18:43: User NAME: L 09/07/2021 - 22:18:43: Admin IP: 0
L 09/07/2021 - 22:18:43: Admin Steam ID: 24
L 09/07/2021 - 22:18:43: Admin Steam Name:
L 09/07/2021 - 22:18:43: Admin Ban TYPE: 
L 09/07/2021 - 22:18:43: Ban Reason: 
L 09/07/2021 - 22:18:43: Ban Time: 0
L 09/07/2021 - 22:18:48: User Steam ID: 24
L 09/07/2021 - 22:18:48: User IP: 24
L 09/07/2021 - 22:18:48: User NAME: L 09/07/2021 - 22:18:48: Admin IP: 0
L 09/07/2021 - 22:18:48: Admin Steam ID: 24
L 09/07/2021 - 22:18:48: Admin Steam Name:
L 09/07/2021 - 22:18:48: Admin Ban TYPE: 
L 09/07/2021 - 22:18:48: Ban Reason: 
L 09/07/2021 - 22:18:48: Ban Time: 0
L 09/07/2021 - 22:18:53: User Steam ID: 24
L 09/07/2021 - 22:18:53: User IP: 24
L 09/07/2021 - 22:18:53: User NAME: L 09/07/2021 - 22:18:53: Admin IP: 0
L 09/07/2021 - 22:18:53: Admin Steam ID: 24
L 09/07/2021 - 22:18:53: Admin Steam Name:
L 09/07/2021 - 22:18:53: Admin Ban TYPE: 
L 09/07/2021 - 22:18:53: Ban Reason: 
L 09/07/2021 - 22:18:53: Ban Time: 0
L 09/07/2021 - 22:18:58: User Steam ID: 24
L 09/07/2021 - 22:18:58: User IP: 24
L 09/07/2021 - 22:18:58: User NAME: L 09/07/2021 - 22:18:58: Admin IP: 0
L 09/07/2021 - 22:18:58: Admin Steam ID: 24
L 09/07/2021 - 22:18:58: Admin Steam Name:
L 09/07/2021 - 22:18:58: Admin Ban TYPE: 
L 09/07/2021 - 22:18:58: Ban Reason: 
L 09/07/2021 - 22:18:58: Ban Time: 0
L 09/07/2021 - 22:19:03: User Steam ID: 24
L 09/07/2021 - 22:19:03: User IP: 24
L 09/07/2021 - 22:19:03: User NAME: L 09/07/2021 - 22:19:03: Admin IP: 0
L 09/07/2021 - 22:19:03: Admin Steam ID: 24
L 09/07/2021 - 22:19:03: Admin Steam Name:
L 09/07/2021 - 22:19:03: Admin Ban TYPE: 
L 09/07/2021 - 22:19:03: Ban Reason: 
L 09/07/2021 - 22:19:03: Ban Time: 0
L 09/07/2021 - 22:19:08: User Steam ID: 24
L 09/07/2021 - 22:19:08: User IP: 24
L 09/07/2021 - 22:19:08: User NAME: L 09/07/2021 - 22:19:08: Admin IP: 0
L 09/07/2021 - 22:19:08: Admin Steam ID: 24
L 09/07/2021 - 22:19:08: Admin Steam Name:
L 09/07/2021 - 22:19:08: Admin Ban TYPE: 
L 09/07/2021 - 22:19:08: Ban Reason: 
L 09/07/2021 - 22:19:08: Ban Time: 0
L 09/07/2021 - 22:19:13: User Steam ID: 24
L 09/07/2021 - 22:19:13: User IP: 24
L 09/07/2021 - 22:19:13: User NAME: L 09/07/2021 - 22:19:13: Admin IP: 0
L 09/07/2021 - 22:19:13: Admin Steam ID: 24
L 09/07/2021 - 22:19:13: Admin Steam Name:
L 09/07/2021 - 22:19:13: Admin Ban TYPE: 
L 09/07/2021 - 22:19:13: Ban Reason: 
L 09/07/2021 - 22:19:13: Ban Time: 0
L 09/07/2021 - 22:19:18: User Steam ID: 24
L 09/07/2021 - 22:19:18: User IP: 24
L 09/07/2021 - 22:19:18: User NAME: L 09/07/2021 - 22:19:18: Admin IP: 0
L 09/07/2021 - 22:19:18: Admin Steam ID: 24
L 09/07/2021 - 22:19:18: Admin Steam Name:
L 09/07/2021 - 22:19:18: Admin Ban TYPE: 
L 09/07/2021 - 22:19:18: Ban Reason: 
L 09/07/2021 - 22:19:18: Ban Time: 0
L 09/07/2021 - 22:19:23: User Steam ID: 24
L 09/07/2021 - 22:19:23: User IP: 24
L 09/07/2021 - 22:19:23: User NAME: L 09/07/2021 - 22:19:23: Admin IP: 0
L 09/07/2021 - 22:19:23: Admin Steam ID: 24
L 09/07/2021 - 22:19:23: Admin Steam Name:
L 09/07/2021 - 22:19:23: Admin Ban TYPE: 
L 09/07/2021 - 22:19:23: Ban Reason: 
L 09/07/2021 - 22:19:23: Ban Time: 0
L 09/07/2021 - 22:19:28: User Steam ID: 24
L 09/07/2021 - 22:19:28: User IP: 24
L 09/07/2021 - 22:19:28: User NAME: L 09/07/2021 - 22:19:28: Admin IP: 0
L 09/07/2021 - 22:19:28: Admin Steam ID: 24
L 09/07/2021 - 22:19:28: Admin Steam Name:
L 09/07/2021 - 22:19:28: Admin Ban TYPE: 
L 09/07/2021 - 22:19:28: Ban Reason: 
L 09/07/2021 - 22:19:28: Ban Time: 0
L 09/07/2021 - 22:19:33: User Steam ID: 24
L 09/07/2021 - 22:19:33: User IP: 24
L 09/07/2021 - 22:19:33: User NAME: L 09/07/2021 - 22:19:33: Admin IP: 0
L 09/07/2021 - 22:19:33: Admin Steam ID: 24
L 09/07/2021 - 22:19:33: Admin Steam Name:
L 09/07/2021 - 22:19:33: Admin Ban TYPE: 
L 09/07/2021 - 22:19:33: Ban Reason: 
L 09/07/2021 - 22:19:33: Ban Time: 0
L 09/07/2021 - 22:19:38: User Steam ID: 24
L 09/07/2021 - 22:19:38: User IP: 24
L 09/07/2021 - 22:19:38: User NAME: L 09/07/2021 - 22:19:38: Admin IP: 0
L 09/07/2021 - 22:19:38: Admin Steam ID: 24
L 09/07/2021 - 22:19:38: Admin Steam Name:
L 09/07/2021 - 22:19:38: Admin Ban TYPE: 
L 09/07/2021 - 22:19:38: Ban Reason: 
L 09/07/2021 - 22:19:38: Ban Time: 0
L 09/07/2021 - 22:19:43: User Steam ID: 24
L 09/07/2021 - 22:19:43: User IP: 24
L 09/07/2021 - 22:19:43: User NAME: L 09/07/2021 - 22:19:43: Admin IP: 0
L 09/07/2021 - 22:19:43: Admin Steam ID: 24
L 09/07/2021 - 22:19:43: Admin Steam Name:
L 09/07/2021 - 22:19:43: Admin Ban TYPE: 
L 09/07/2021 - 22:19:43: Ban Reason: 
L 09/07/2021 - 22:19:43: Ban Time: 0
L 09/07/2021 - 22:19:48: User Steam ID: 24
L 09/07/2021 - 22:19:48: User IP: 24
L 09/07/2021 - 22:19:48: User NAME: L 09/07/2021 - 22:19:48: Admin IP: 0
L 09/07/2021 - 22:19:48: Admin Steam ID: 24
L 09/07/2021 - 22:19:48: Admin Steam Name:
L 09/07/2021 - 22:19:48: Admin Ban TYPE: 
L 09/07/2021 - 22:19:48: Ban Reason: 
L 09/07/2021 - 22:19:48: Ban Time: 0
L 09/07/2021 - 22:19:53: User Steam ID: 24
L 09/07/2021 - 22:19:53: User IP: 24
L 09/07/2021 - 22:19:53: User NAME: L 09/07/2021 - 22:19:53: Admin IP: 0
L 09/07/2021 - 22:19:53: Admin Steam ID: 24
L 09/07/2021 - 22:19:53: Admin Steam Name:
L 09/07/2021 - 22:19:53: Admin Ban TYPE: 
L 09/07/2021 - 22:19:53: Ban Reason: 
L 09/07/2021 - 22:19:53: Ban Time: 0
L 09/07/2021 - 22:19:58: User Steam ID: 24
L 09/07/2021 - 22:19:58: User IP: 24
L 09/07/2021 - 22:19:58: User NAME: L 09/07/2021 - 22:19:58: Admin IP: 0
L 09/07/2021 - 22:19:58: Admin Steam ID: 24
L 09/07/2021 - 22:19:58: Admin Steam Name:
L 09/07/2021 - 22:19:58: Admin Ban TYPE: 
L 09/07/2021 - 22:19:58: Ban Reason: 
L 09/07/2021 - 22:19:58: Ban Time: 0
L 09/07/2021 - 22:20:03: User Steam ID: 24
L 09/07/2021 - 22:20:03: User IP: 24
L 09/07/2021 - 22:20:03: User NAME: L 09/07/2021 - 22:20:03: Admin IP: 0
L 09/07/2021 - 22:20:03: Admin Steam ID: 24
L 09/07/2021 - 22:20:03: Admin Steam Name:
L 09/07/2021 - 22:20:03: Admin Ban TYPE: 
L 09/07/2021 - 22:20:03: Ban Reason: 
L 09/07/2021 - 22:20:03: Ban Time: 0
L 09/07/2021 - 22:20:08: User Steam ID: 24
L 09/07/2021 - 22:20:08: User IP: 24
L 09/07/2021 - 22:20:08: User NAME: L 09/07/2021 - 22:20:08: Admin IP: 0
L 09/07/2021 - 22:20:08: Admin Steam ID: 24
L 09/07/2021 - 22:20:08: Admin Steam Name:
L 09/07/2021 - 22:20:08: Admin Ban TYPE: 
L 09/07/2021 - 22:20:08: Ban Reason: 
L 09/07/2021 - 22:20:08: Ban Time: 0
L 09/07/2021 - 22:20:13: User Steam ID: 24
L 09/07/2021 - 22:20:13: User IP: 24
L 09/07/2021 - 22:20:13: User NAME: L 09/07/2021 - 22:20:13: Admin IP: 0
L 09/07/2021 - 22:20:13: Admin Steam ID: 24
L 09/07/2021 - 22:20:13: Admin Steam Name:
L 09/07/2021 - 22:20:13: Admin Ban TYPE: 
L 09/07/2021 - 22:20:13: Ban Reason: 
L 09/07/2021 - 22:20:13: Ban Time: 0
L 09/07/2021 - 22:20:18: User Steam ID: 24
L 09/07/2021 - 22:20:18: User IP: 24
L 09/07/2021 - 22:20:18: User NAME: L 09/07/2021 - 22:20:18: Admin IP: 0
L 09/07/2021 - 22:20:18: Admin Steam ID: 24
L 09/07/2021 - 22:20:18: Admin Steam Name:
L 09/07/2021 - 22:20:18: Admin Ban TYPE: 
L 09/07/2021 - 22:20:18: Ban Reason: 
L 09/07/2021 - 22:20:18: Ban Time: 0
L 09/07/2021 - 22:20:23: User Steam ID: 24
L 09/07/2021 - 22:20:23: User IP: 24
L 09/07/2021 - 22:20:23: User NAME: L 09/07/2021 - 22:20:23: Admin IP: 0
L 09/07/2021 - 22:20:23: Admin Steam ID: 24
L 09/07/2021 - 22:20:23: Admin Steam Name:
L 09/07/2021 - 22:20:23: Admin Ban TYPE: 
L 09/07/2021 - 22:20:23: Ban Reason: 
L 09/07/2021 - 22:20:23: Ban Time: 0
L 09/07/2021 - 22:20:28: User Steam ID: 24
L 09/07/2021 - 22:20:28: User IP: 24
L 09/07/2021 - 22:20:28: User NAME: L 09/07/2021 - 22:20:28: Admin IP: 0
L 09/07/2021 - 22:20:28: Admin Steam ID: 24
L 09/07/2021 - 22:20:28: Admin Steam Name:
L 09/07/2021 - 22:20:28: Admin Ban TYPE: 
L 09/07/2021 - 22:20:28: Ban Reason: 
L 09/07/2021 - 22:20:28: Ban Time: 0
L 09/07/2021 - 22:20:33: User Steam ID: 24
L 09/07/2021 - 22:20:33: User IP: 24
L 09/07/2021 - 22:20:33: User NAME: L 09/07/2021 - 22:20:33: Admin IP: 0
L 09/07/2021 - 22:20:33: Admin Steam ID: 24
L 09/07/2021 - 22:20:33: Admin Steam Name:
L 09/07/2021 - 22:20:33: Admin Ban TYPE: 
L 09/07/2021 - 22:20:33: Ban Reason: 
L 09/07/2021 - 22:20:33: Ban Time: 0
L 09/07/2021 - 22:20:38: User Steam ID: 24
L 09/07/2021 - 22:20:38: User IP: 24
L 09/07/2021 - 22:20:38: User NAME: L 09/07/2021 - 22:20:38: Admin IP: 0
L 09/07/2021 - 22:20:38: Admin Steam ID: 24
L 09/07/2021 - 22:20:38: Admin Steam Name:
L 09/07/2021 - 22:20:38: Admin Ban TYPE: 
L 09/07/2021 - 22:20:38: Ban Reason: 
L 09/07/2021 - 22:20:38: Ban Time: 0
L 09/07/2021 - 22:20:43: User Steam ID: 24
L 09/07/2021 - 22:20:43: User IP: 24
L 09/07/2021 - 22:20:43: User NAME: L 09/07/2021 - 22:20:43: Admin IP: 0
L 09/07/2021 - 22:20:43: Admin Steam ID: 24
L 09/07/2021 - 22:20:43: Admin Steam Name:
L 09/07/2021 - 22:20:43: Admin Ban TYPE: 
L 09/07/2021 - 22:20:43: Ban Reason: 
L 09/07/2021 - 22:20:43: Ban Time: 0
L 09/07/2021 - 22:20:48: User Steam ID: 24
L 09/07/2021 - 22:20:48: User IP: 24
L 09/07/2021 - 22:20:48: User NAME: L 09/07/2021 - 22:20:48: Admin IP: 0
L 09/07/2021 - 22:20:48: Admin Steam ID: 24
L 09/07/2021 - 22:20:48: Admin Steam Name:
L 09/07/2021 - 22:20:48: Admin Ban TYPE: 
L 09/07/2021 - 22:20:48: Ban Reason: 
L 09/07/2021 - 22:20:48: Ban Time: 0
L 09/07/2021 - 22:20:53: User Steam ID: 24
L 09/07/2021 - 22:20:53: User IP: 24
L 09/07/2021 - 22:20:53: User NAME: L 09/07/2021 - 22:20:53: Admin IP: 0
L 09/07/2021 - 22:20:53: Admin Steam ID: 24
L 09/07/2021 - 22:20:53: Admin Steam Name:
L 09/07/2021 - 22:20:53: Admin Ban TYPE: 
L 09/07/2021 - 22:20:53: Ban Reason: 
L 09/07/2021 - 22:20:53: Ban Time: 0
L 09/07/2021 - 22:20:58: User Steam ID: 24
L 09/07/2021 - 22:20:58: User IP: 24
L 09/07/2021 - 22:20:58: User NAME: L 09/07/2021 - 22:20:58: Admin IP: 0
L 09/07/2021 - 22:20:58: Admin Steam ID: 24
L 09/07/2021 - 22:20:58: Admin Steam Name:
L 09/07/2021 - 22:20:58: Admin Ban TYPE: 
L 09/07/2021 - 22:20:58: Ban Reason: 
L 09/07/2021 - 22:20:58: Ban Time: 0
L 09/07/2021 - 22:21:03: User Steam ID: 24
L 09/07/2021 - 22:21:03: User IP: 24
L 09/07/2021 - 22:21:03: User NAME: L 09/07/2021 - 22:21:03: Admin IP: 0
L 09/07/2021 - 22:21:03: Admin Steam ID: 24
L 09/07/2021 - 22:21:03: Admin Steam Name:
L 09/07/2021 - 22:21:03: Admin Ban TYPE: 
L 09/07/2021 - 22:21:03: Ban Reason: 
L 09/07/2021 - 22:21:03: Ban Time: 0
L 09/07/2021 - 22:21:08: User Steam ID: 24
L 09/07/2021 - 22:21:08: User IP: 24
L 09/07/2021 - 22:21:08: User NAME: L 09/07/2021 - 22:21:08: Admin IP: 0
L 09/07/2021 - 22:21:08: Admin Steam ID: 24
L 09/07/2021 - 22:21:08: Admin Steam Name:
L 09/07/2021 - 22:21:08: Admin Ban TYPE: 
L 09/07/2021 - 22:21:08: Ban Reason: 
L 09/07/2021 - 22:21:08: Ban Time: 0
L 09/07/2021 - 22:21:13: User Steam ID: 24
L 09/07/2021 - 22:21:13: User IP: 24
L 09/07/2021 - 22:21:13: User NAME: L 09/07/2021 - 22:21:13: Admin IP: 0
L 09/07/2021 - 22:21:13: Admin Steam ID: 24
L 09/07/2021 - 22:21:13: Admin Steam Name:
L 09/07/2021 - 22:21:13: Admin Ban TYPE: 
L 09/07/2021 - 22:21:13: Ban Reason: 
L 09/07/2021 - 22:21:13: Ban Time: 0
L 09/07/2021 - 22:21:18: User Steam ID: 24
L 09/07/2021 - 22:21:18: User IP: 24
L 09/07/2021 - 22:21:18: User NAME: L 09/07/2021 - 22:21:18: Admin IP: 0
L 09/07/2021 - 22:21:18: Admin Steam ID: 24
L 09/07/2021 - 22:21:18: Admin Steam Name:
L 09/07/2021 - 22:21:18: Admin Ban TYPE: 
L 09/07/2021 - 22:21:18: Ban Reason: 
L 09/07/2021 - 22:21:18: Ban Time: 0
L 09/07/2021 - 22:21:23: User Steam ID: 24
L 09/07/2021 - 22:21:23: User IP: 24
L 09/07/2021 - 22:21:23: User NAME: L 09/07/2021 - 22:21:23: Admin IP: 0
L 09/07/2021 - 22:21:23: Admin Steam ID: 24
L 09/07/2021 - 22:21:23: Admin Steam Name:
L 09/07/2021 - 22:21:23: Admin Ban TYPE: 
L 09/07/2021 - 22:21:23: Ban Reason: 
L 09/07/2021 - 22:21:23: Ban Time: 0
L 09/07/2021 - 22:21:28: User Steam ID: 24
L 09/07/2021 - 22:21:28: User IP: 24
L 09/07/2021 - 22:21:28: User NAME: L 09/07/2021 - 22:21:28: Admin IP: 0
L 09/07/2021 - 22:21:28: Admin Steam ID: 24
L 09/07/2021 - 22:21:28: Admin Steam Name:
L 09/07/2021 - 22:21:28: Admin Ban TYPE: 
L 09/07/2021 - 22:21:28: Ban Reason: 
L 09/07/2021 - 22:21:28: Ban Time: 0
L 09/07/2021 - 22:21:33: User Steam ID: 24
L 09/07/2021 - 22:21:33: User IP: 24
L 09/07/2021 - 22:21:33: User NAME: L 09/07/2021 - 22:21:33: Admin IP: 0
L 09/07/2021 - 22:21:33: Admin Steam ID: 24
L 09/07/2021 - 22:21:33: Admin Steam Name:
L 09/07/2021 - 22:21:33: Admin Ban TYPE: 
L 09/07/2021 - 22:21:33: Ban Reason: 
L 09/07/2021 - 22:21:33: Ban Time: 0
L 09/07/2021 - 22:21:38: User Steam ID: 24
L 09/07/2021 - 22:21:38: User IP: 24
L 09/07/2021 - 22:21:38: User NAME: L 09/07/2021 - 22:21:38: Admin IP: 0
L 09/07/2021 - 22:21:38: Admin Steam ID: 24
L 09/07/2021 - 22:21:38: Admin Steam Name:
L 09/07/2021 - 22:21:38: Admin Ban TYPE: 
L 09/07/2021 - 22:21:38: Ban Reason: 
L 09/07/2021 - 22:21:38: Ban Time: 0
L 09/07/2021 - 22:21:43: User Steam ID: 24
L 09/07/2021 - 22:21:43: User IP: 24
L 09/07/2021 - 22:21:43: User NAME: L 09/07/2021 - 22:21:43: Admin IP: 0
L 09/07/2021 - 22:21:43: Admin Steam ID: 24
L 09/07/2021 - 22:21:43: Admin Steam Name:
L 09/07/2021 - 22:21:43: Admin Ban TYPE: 
L 09/07/2021 - 22:21:43: Ban Reason: 
L 09/07/2021 - 22:21:43: Ban Time: 0
L 09/07/2021 - 22:21:48: User Steam ID: 24
L 09/07/2021 - 22:21:48: User IP: 24
L 09/07/2021 - 22:21:48: User NAME: L 09/07/2021 - 22:21:48: Admin IP: 0
L 09/07/2021 - 22:21:48: Admin Steam ID: 24
L 09/07/2021 - 22:21:48: Admin Steam Name:
L 09/07/2021 - 22:21:48: Admin Ban TYPE: 
L 09/07/2021 - 22:21:48: Ban Reason: 
L 09/07/2021 - 22:21:48: Ban Time: 0
L 09/07/2021 - 22:21:53: User Steam ID: 24
L 09/07/2021 - 22:21:53: User IP: 24
L 09/07/2021 - 22:21:53: User NAME: L 09/07/2021 - 22:21:53: Admin IP: 0
L 09/07/2021 - 22:21:53: Admin Steam ID: 24
L 09/07/2021 - 22:21:53: Admin Steam Name:
L 09/07/2021 - 22:21:53: Admin Ban TYPE: 
L 09/07/2021 - 22:21:53: Ban Reason: 
L 09/07/2021 - 22:21:53: Ban Time: 0
L 09/07/2021 - 22:21:58: User Steam ID: 24
L 09/07/2021 - 22:21:58: User IP: 24
L 09/07/2021 - 22:21:58: User NAME: L 09/07/2021 - 22:21:58: Admin IP: 0
L 09/07/2021 - 22:21:58: Admin Steam ID: 24
L 09/07/2021 - 22:21:58: Admin Steam Name:
L 09/07/2021 - 22:21:58: Admin Ban TYPE: 
L 09/07/2021 - 22:21:58: Ban Reason: 
L 09/07/2021 - 22:21:58: Ban Time: 0
L 09/07/2021 - 22:22:03: User Steam ID: 24
L 09/07/2021 - 22:22:03: User IP: 24
L 09/07/2021 - 22:22:03: User NAME: L 09/07/2021 - 22:22:03: Admin IP: 0
L 09/07/2021 - 22:22:03: Admin Steam ID: 24
L 09/07/2021 - 22:22:03: Admin Steam Name:
L 09/07/2021 - 22:22:03: Admin Ban TYPE: 
L 09/07/2021 - 22:22:03: Ban Reason: 
L 09/07/2021 - 22:22:03: Ban Time: 0
L 09/07/2021 - 22:22:08: User Steam ID: 24
L 09/07/2021 - 22:22:08: User IP: 24
L 09/07/2021 - 22:22:08: User NAME: L 09/07/2021 - 22:22:08: Admin IP: 0
L 09/07/2021 - 22:22:08: Admin Steam ID: 24
L 09/07/2021 - 22:22:08: Admin Steam Name:
L 09/07/2021 - 22:22:08: Admin Ban TYPE: 
L 09/07/2021 - 22:22:08: Ban Reason: 
L 09/07/2021 - 22:22:08: Ban Time: 0
L 09/07/2021 - 22:29:26: User IP: 24
L 09/07/2021 - 22:29:26: User NAME: L 09/07/2021 - 22:29:26: Admin IP: 0
L 09/07/2021 - 22:29:26: Admin Steam ID: 24
L 09/07/2021 - 22:29:26: Admin Steam Name: 
L 09/07/2021 - 22:29:26: Admin Ban TYPE: 
L 09/07/2021 - 22:29:26: Ban Reason: 
L 09/07/2021 - 22:29:26: Ban Time: 0
L 09/07/2021 - 22:29:31: User Steam ID: 24
L 09/07/2021 - 22:29:31: User IP: 24
L 09/07/2021 - 22:29:31: User NAME: L 09/07/2021 - 22:29:31: Admin IP: 0
L 09/07/2021 - 22:29:31: Admin Steam ID: 24
L 09/07/2021 - 22:29:31: Admin Steam Name: 
L 09/07/2021 - 22:29:31: Admin Ban TYPE: 
L 09/07/2021 - 22:29:31: Ban Reason: 
L 09/07/2021 - 22:29:31: Ban Time: 0
L 09/07/2021 - 22:29:36: User Steam ID: 24
L 09/07/2021 - 22:29:36: User IP: 24
L 09/07/2021 - 22:29:36: User NAME: L 09/07/2021 - 22:29:36: Admin IP: 0
L 09/07/2021 - 22:29:36: Admin Steam ID: 24
L 09/07/2021 - 22:29:36: Admin Steam Name: 
L 09/07/2021 - 22:29:36: Admin Ban TYPE: 
L 09/07/2021 - 22:29:36: Ban Reason: 
L 09/07/2021 - 22:29:36: Ban Time: 0
L 09/07/2021 - 22:29:41: User Steam ID: 24
L 09/07/2021 - 22:29:41: User IP: 24
L 09/07/2021 - 22:29:41: User NAME: L 09/07/2021 - 22:29:41: Admin IP: 0
L 09/07/2021 - 22:29:41: Admin Steam ID: 24
L 09/07/2021 - 22:29:41: Admin Steam Name: 
L 09/07/2021 - 22:29:41: Admin Ban TYPE: 
L 09/07/2021 - 22:29:41: Ban Reason: 
L 09/07/2021 - 22:29:41: Ban Time: 0
1631043348592.png
 
Сообщения
340
Реакции
94
Помог
2 раз(а)
Возможно
Код:
public Task_Motd(id, aData[])
т.к. вы id даёте, а потом массив.
Структура из amxbans gm 1.6 . Удобнее, если знаете его работу. Жалко что разбор 6.13 есть, а вот gm 1.6 — нет. Рекомендую бансистему изучить полностью.
Код:
enum _banData
{
    banReason[128],
    banSteamid[34],
    banName[32],
    banIp[22],
    banType[3],
    banTime,
    banPlayer // id игрока
}
new banData[33][_banData]


enum _playerData
{
    playerSteamid[34],
    playerName[32],
    playerIp[22]
}
new playerData[33][_playerData]
 
Сообщения
6
Реакции
3
maFFyoZZyk,
я сам так иногда делаю (как написал уже Mistrick, )
посылаю мусор на входе - и получаю мусор на выходе)
тогда в лог идет все подряд
пробуйте
Код:
#include < amxmodx >

enum _: infoAdminAndBan
{
    szUSteamid[48],
    szUIp[32],
    szUName[64],
    szAIp[32],
    szASteamid[48],
    szAName[64],
    szUBanType[64],
    szUReason[128],
    iUBanTime
};

public fbans_player_banned_pre_f(const id, const userid, const steamid[],
    const ip[], const name[], const admin_ip[],
    const admin_steamid[], const admin_name[], const ban_type[],
    const reason[], const bantime)
{
    if(!id || !is_user_connected(id) || get_user_userid(id)!=userid)  
        return PLUGIN_HANDLED;
   
    log_to_file("forward.log", "log start 1");
    log_to_file("forward.log", "User Steam ID: %s", steamid );
    log_to_file("forward.log", "User IP: %s", ip );
    log_to_file("forward.log", "User NAME: %s", name );
    log_to_file("forward.log", "Admin IP: %s", admin_ip );
    log_to_file("forward.log", "Admin Steam ID: %s", admin_steamid );
    log_to_file("forward.log", "Admin Name: %s", admin_name );
    log_to_file("forward.log", "Admin Ban TYPE: %s", ban_type );
    log_to_file("forward.log", "Ban Reason: %s", reason );
    log_to_file("forward.log", "Ban Time: %d",  bantime);
    log_to_file("forward.log", "log end 1");
    log_to_file("forward.log", "-----------------------");
   
    new aData[infoAdminAndBan];
    copy( aData[ szUSteamid ], charsmax( aData[ szUSteamid ] ) , steamid );
    copy( aData[ szUIp ], charsmax( aData[ szUIp ] ), ip );
    copy( aData[ szUName ], charsmax( aData[ szUName ] ) , name );
    copy( aData[ szAIp ], charsmax( aData[ szAIp ] ) , admin_ip );
    copy( aData[ szASteamid ], charsmax( aData[ szASteamid ] ) , admin_steamid );
    copy( aData[ szAName ], charsmax( aData[ szAName ] ) , admin_name );
    copy( aData[ szUBanType ], charsmax( aData[ szUBanType ] ) , ban_type );
    copy( aData[ szUReason ], charsmax( aData[ szUReason ] ) , reason );
    aData[ iUBanTime ] = bantime;

    log_to_file("forward.log", "log start 2");
    log_to_file("forward.log", "User Steam ID: %s", aData[ szUSteamid ] );
    log_to_file("forward.log", "User IP: %s", aData[ szUIp ] );
    log_to_file("forward.log", "User NAME: %s",  aData[ szUName ] );
    log_to_file("forward.log", "Admin IP: %s", aData[ szAIp ] );
    log_to_file("forward.log", "Admin Steam ID: %s", aData[ szASteamid ] );
    log_to_file("forward.log", "Admin Name: %s", aData[ szAName ] );
    log_to_file("forward.log", "Admin Ban TYPE: %s", aData[ szUBanType ] );
    log_to_file("forward.log", "Ban Reason: %s", aData[ szUReason ] );
    log_to_file("forward.log", "Ban Time: %d",  aData[ iUBanTime ] );
    log_to_file("forward.log", "log end 2");
    log_to_file("forward.log", "-----------------------");

    set_task( 5.0, "Task_Motd", id, aData, sizeof( aData ));
   
    return PLUGIN_HANDLED;
}

public Task_Motd(aData[], id)  
{
    log_to_file("forward.log", "log start 3 Callback");
    log_to_file("forward.log", "User Steam ID: %s", aData[ szUSteamid ] );
    log_to_file("forward.log", "User IP: %s", aData[ szUIp ] );
    log_to_file("forward.log", "User NAME: %s",  aData[ szUName ] );
    log_to_file("forward.log", "Admin IP: %s", aData[ szAIp ] );
    log_to_file("forward.log", "Admin Steam ID: %s", aData[ szASteamid ] );
    log_to_file("forward.log", "Admin Name: %s", aData[ szAName ] );
    log_to_file("forward.log", "Admin Ban TYPE: %s", aData[ szUBanType ] );
    log_to_file("forward.log", "Ban Reason: %s", aData[ szUReason ] );
    log_to_file("forward.log", "Ban Time: %d",  aData[ iUBanTime ] );
    log_to_file("forward.log", "log end 3 Callback");
    log_to_file("forward.log", "-----------------------");
}
 
Последнее редактирование:
Сообщения
64
Реакции
131
Помог
4 раз(а)
Скорей всего проблема в самом forward, нужно смотреть плагин, который его вызывает
 
Сообщения
340
Реакции
94
Помог
2 раз(а)
maFFyoZZyk,
я сам так иногда делаю (как написал уже Mistrick, )
посылаю мусор на входе - и получаю мусор на выходе)
тогда в лог идет все подряд
пробуйте
Код:
#include < amxmodx >

enum _: infoAdminAndBan
{
    szUSteamid[48],
    szUIp[32],
    szUName[64],
    szAIp[32],
    szASteamid[48],
    szAName[64],
    szUBanType[64],
    szUReason[128],
    iUBanTime
};

public fbans_player_banned_pre_f(const id, const userid, const steamid[],
    const ip[], const name[], const admin_ip[],
    const admin_steamid[], const admin_name[], const ban_type[],
    const reason[], const bantime)
{
    if(!id || !is_user_connected(id) || get_user_userid(id)!=userid) 
        return PLUGIN_HANDLED;
  
    log_to_file("forward.log", "log start 1");
    log_to_file("forward.log", "User Steam ID: %s", steamid );
    log_to_file("forward.log", "User IP: %s", ip );
    log_to_file("forward.log", "User NAME: %s", name );
    log_to_file("forward.log", "Admin IP: %s", admin_ip );
    log_to_file("forward.log", "Admin Steam ID: %s", admin_steamid );
    log_to_file("forward.log", "Admin Name: %s", admin_name );
    log_to_file("forward.log", "Admin Ban TYPE: %s", ban_type );
    log_to_file("forward.log", "Ban Reason: %s", reason );
    log_to_file("forward.log", "Ban Time: %d",  bantime);
    log_to_file("forward.log", "log end 1");
    log_to_file("forward.log", "-----------------------");
  
    new aData[infoAdminAndBan];
    copy( aData[ szUSteamid ], charsmax( aData[ szUSteamid ] ) , steamid );
    copy( aData[ szUIp ], charsmax( aData[ szUIp ] ), ip );
    copy( aData[ szUName ], charsmax( aData[ szUName ] ) , name );
    copy( aData[ szAIp ], charsmax( aData[ szAIp ] ) , admin_ip );
    copy( aData[ szASteamid ], charsmax( aData[ szASteamid ] ) , admin_steamid );
    copy( aData[ szAName ], charsmax( aData[ szAName ] ) , admin_name );
    copy( aData[ szUBanType ], charsmax( aData[ szUBanType ] ) , ban_type );
    copy( aData[ szUReason ], charsmax( aData[ szUReason ] ) , reason );
    aData[ iUBanTime ] = bantime;

    log_to_file("forward.log", "log start 2");
    log_to_file("forward.log", "User Steam ID: %s", aData[ szUSteamid ] );
    log_to_file("forward.log", "User IP: %s", aData[ szUIp ] );
    log_to_file("forward.log", "User NAME: %s",  aData[ szUName ] );
    log_to_file("forward.log", "Admin IP: %s", aData[ szAIp ] );
    log_to_file("forward.log", "Admin Steam ID: %s", aData[ szASteamid ] );
    log_to_file("forward.log", "Admin Name: %s", aData[ szAName ] );
    log_to_file("forward.log", "Admin Ban TYPE: %s", aData[ szUBanType ] );
    log_to_file("forward.log", "Ban Reason: %s", aData[ szUReason ] );
    log_to_file("forward.log", "Ban Time: %d",  aData[ iUBanTime ] );
    log_to_file("forward.log", "log end 2");
    log_to_file("forward.log", "-----------------------");

    set_task( 5.0, "Task_Motd", id, aData, sizeof( aData ));
  
    return PLUGIN_HANDLED;
}

public Task_Motd(aData[], id) 
{
    log_to_file("forward.log", "log start 3 Callback");
    log_to_file("forward.log", "User Steam ID: %s", aData[ szUSteamid ] );
    log_to_file("forward.log", "User IP: %s", aData[ szUIp ] );
    log_to_file("forward.log", "User NAME: %s",  aData[ szUName ] );
    log_to_file("forward.log", "Admin IP: %s", aData[ szAIp ] );
    log_to_file("forward.log", "Admin Steam ID: %s", aData[ szASteamid ] );
    log_to_file("forward.log", "Admin Name: %s", aData[ szAName ] );
    log_to_file("forward.log", "Admin Ban TYPE: %s", aData[ szUBanType ] );
    log_to_file("forward.log", "Ban Reason: %s", aData[ szUReason ] );
    log_to_file("forward.log", "Ban Time: %d",  aData[ iUBanTime ] );
    log_to_file("forward.log", "log end 3 Callback");
    log_to_file("forward.log", "-----------------------");
}
Да, так... что-то вечером в глаза долбился и не заметил %d, где строки...

Рекомендую
Код:
enum _: infoAdminAndBan
{
    szUSteamid[34], // Вроде бы максимальное
    szUIp[22], // ip+port. 255.255.255.255:27015
    szUName[32], // Максимум ника.
    szAIp[22], // ip+port. 255.255.255.255:27015
    szASteamid[34], // Вроде бы максимальное
    szAName[32], // Максимум ника.
    szUBanType[32], // можно ещё меньше, если у вас кроме "STEAM + IP" нет других длинных.
    szUReason[128], 
    szUBanTime // Зачем массив, если можно просто переменную?  
}
Возможно ещё...
Скорей всего проблема в самом forward, нужно смотреть плагин, который его вызывает
А теперь вопрос. Это вызов во время бана игрока?
 
Сообщения
775
Реакции
294
Помог
11 раз(а)
Sonic, в чем разница между fbans_player_banned_pre_f и fbans_player_banned_pre
8 Сен 2021
Потому как твой код работает исправно, мой нет. Хотя заменил ты только это по сути
 
Сообщения
775
Реакции
294
Помог
11 раз(а)
Вопрос решен, тему можно закрывать. Спасибо Sonic, его метод замены форварда помог
8 Сен 2021
Хотя, было бы не плохо дождаться ответа от mazdan
 

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

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