! - . . , , . , , , (, ) . !







Visage Role Play - . /adminka , ! http://visage-rp.ru
VK: vk.com/sergey68

76890 - 1000,46860 - 500, 300
** V.I.P --> **

: - v.2

1 8 8

  1. #1

      execution

    :
    :23.06.2017
    :150
    :18 [+/-] 

    - v.2

    - . Pawn.CMD, sscanf2

    :

    *
    * , .
    * 8 ()
    *
    * //
    * , -


    :
    : https://imgur.com/a/mCd67KF
    - v.1: https://pawno-info.ru/threads/306835...0%BE%D1%82-v-1
    include: https://drive.google.com/open?id=19J...CuetOClwuEIpvZ





    PHP :
    #define MAX_PLAYER_LISTITEM                    25             //   listitem

    #define    MAX_ADMIN_BOT_REQUEST                 3            //      
    #define    MAX_ADMIN_BOT_REQUEST_LENGTH        8            //     
    #define    MAX_ADMIN_BOT_SUPPORT_COUNT            8            //   
    #define MIN_ADMIN_BOT_SUPPORT_COUNT            0            //   
    #define    MAX_ADMIN_BOT_PUNISH_REASON            50          //     
    #define MAX_ADMIN_BOT_PUNISN_NAME_LENGTH    24            //     
    #define ADMIN_BOT_INVALID_REQUEST_ID        MAX_ADMIN_BOT_SUPPORT_COUNT + 1        //  ID 
    #define ADMIN_BOT_HEX_COLOR                    0xFF6347FF     //   -


    enum //  ID 
    {
        
    dAbotreqinfo,
        
    dAbotreqmenu,
        
    dAbotreqlist
    }

    enum //     
    {
        
    CA_REQUEST_NOT_FOUND,
        
    CA_REQUEST_FOUND,
        
    CA_NO_PLACE_IN_REQUEST,
        
    CA_MISSING_ARGUMENT,
        
    CA_INVALID_TARGET_ID
    }

    enum e_ADMIN_BOT_INFO 
    {
        
    aBot_punish_type,
        
    aBot_punish_time,
        
    aBot_punish_reason[MAX_ADMIN_BOT_PUNISH_REASON 1],
        
    aBot_targetid,
        
    aBot_adminid,
        
    aBot_unix_time

    []


    .


    PHP :
    new
        
    AdminBotInfo[MAX_ADMIN_BOT_SUPPORT_COUNT][e_ADMIN_BOT_INFO], //  
        
    PlayerListitem[MAX_PLAYERS][MAX_PLAYER_LISTITEM//   
    ;

    new
        const 
    ADMIN_BOT_PUNISH_NAME[MAX_ADMIN_BOT_REQUEST][MAX_ADMIN_BOT_PUNISN_NAME_LENGTH 1] = //    
        
    {
            
    "",
            
    "  . ",
            
    "  "
        
    };

    new
        const 
    ADMIN_BOT_SUPPORT_COMMAND[MAX_ADMIN_BOT_REQUEST][MAX_ADMIN_BOT_REQUEST_LENGTH] = //     
        
    {  
            
    "/mute"
            
    "/prison"
            
    "/jail"
        
    };

    new
        const 
    ADMIN_BOT_LEVEL_USING_CMD[MAX_ADMIN_BOT_REQUEST] =  //       
        
    {
            
    3,
            
    3,
            
    3
        
    };
        
    new
        
    gADMIN_BOT_SUPPORT_TOTAL_COUNT 0//    
        
    pAdminChoseRequest[MAX_PLAYERS char//   ID  

    []


    stock


    PHP :
    /*
    :
        ShowPlayerAdminBotRequestInfo
    :
        playerid - ID ,  
    :
        1 -  
        0 -   
    :
              .
    */

    stock ShowPlayerAdminBotRequestInfo(playerid)
    {
        if(
    pAdminChoseRequest{playerid} == ADMIN_BOT_INVALID_REQUEST_ID)
            return 
    0;

        new
            
    count pAdminChoseRequest{playerid},
            
    string[MAX_CHATBUBBLE_LEGNTH 1]
        ;
        
        
        
    format(stringsizeof string"\n\
            {C0F08E}: {FFFFFF}%s\n\
            {ED8473}: {FFFFFF}%s\n\n\
            : %s\n\
            : %d \n\
            : %s\n\n\n\
            %s"
    ,
            
    PlayerName(AdminBotInfo[count][aBot_adminid]),
            
    PlayerName(AdminBotInfo[count][aBot_targetid]),
            
    ADMIN_BOT_PUNISH_NAME[AdminBotInfo[count][aBot_punish_type]],
            
    AdminBotInfo[count][aBot_punish_time],
            
    AdminBotInfo[count][aBot_punish_reason],
            
    ADMIN_BOT_LEVEL_USING_CMD[AdminBotInfo[count][aBot_punish_type]] > AdminLevel(playerid
            ? (
    "{AFAFAF}    ") : ("{E2BE1D}   ")
        );

        return 
    ShowPlayerDialog(
            
    playerid,
            
    dAbotreqinfo,
            
    DIALOG_STYLE_MSGBOX,
            !
    " ",
            
    string,
            !
    "", !""
        
    );
    }

    /*
    :
        ShowPlayerAdminBotRequestMenu
    :
        playerid - ID ,  
    :
        1 -  
        0 -   
    :
            .
    */

    stock ShowPlayerAdminBotRequestMenu(playerid)
    {
        if(
    pAdminChoseRequest{playerid} == ADMIN_BOT_INVALID_REQUEST_ID)
            return 
    0;

        return 
    ShowPlayerDialog(
            
    playerid,
            
    dAbotreqmenu,
            
    DIALOG_STYLE_LIST,
            
    PlayerName(AdminBotInfo[pAdminChoseRequest{playerid}][aBot_targetid]),
            !
    "{C0F08E}\n{FFFFFF}\n"
            !
    "", !""
        
    );
    }

    /*
    :
        ShowPlayerAdminBotRequestList
    :
        playerid - ID ,  
    :
        1 -  
    :
           .
    */

    stock ShowPlayerAdminBotRequestList(playerid)
    {
        new
            
    string[(+ ((MAX_PLAYER_NAME 2) * 2) + (- MAX_ADMIN_BOT_PUNISH_REASON) + (- MAX_ADMIN_BOT_PUNISN_NAME_LENGTH
            + (- 
    4)) * MAX_ADMIN_BOT_SUPPORT_COUNT 46] = 
            {
                
    "\t()\t\t\n"
            
    },

            
    count 0
        
    ;

        for(new 
    iter 0iter MAX_ADMIN_BOT_SUPPORT_COUNTiter ++)
        {
            if(
    IsEmptyRequestInAdminBotList(iter))
                    continue;
                
            
    format(stringsizeof string"%s%s\t%s(%d )\t%s\t%s\n",
                
    string,
                
    PlayerName(AdminBotInfo[iter][aBot_adminid]),
                
    ADMIN_BOT_PUNISH_NAME[AdminBotInfo[iter][aBot_punish_type]],
                
    AdminBotInfo[iter][aBot_punish_time],
                
    PlayerName(AdminBotInfo[iter][aBot_targetid]),
                
    AdminBotInfo[iter][aBot_punish_reason]
            );

            
    PlayerListitem[playerid][count++] = iter;

        }

        return 
    ShowPlayerDialog(
            
    playerid,
            
    dAbotreqlist,
            
    DIALOG_STYLE_TABLIST_HEADERS,
            !
    " -",
            
    string,
            !
    "", !""
        
    );
    }

    /*
    :
        GetLastRequestInAdminBot
    :
        -
    :
         ID  .
         -1,    .
    :
         ID   .
    */

    stock GetLastRequestInAdminBot()
    {
        new
            
    tmp_ = -1;
        
        if(
    CountRequestInAdminBotList() == MIN_ADMIN_BOT_SUPPORT_COUNT)
            return 
    tmp_;

        for(new 
    iter 0iter MAX_ADMIN_BOT_SUPPORT_COUNTiter ++)
        {
            if(
    IsEmptyRequestInAdminBotList(iter))
                    continue;
            
            if((
    tmp_ == -1) || (tmp_ != -&& AdminBotInfo[iter][aBot_unix_time] > AdminBotInfo[tmp_][aBot_unix_time]))
            {
                
    tmp_ iter;
            }
        }
        
        return 
    tmp_;
    }

    /*
    :
        CountRequestInAdminBotList
    :
        -
    :
          .
    :
        -
    */

    stock CountRequestInAdminBotList()
    {
        return 
    gADMIN_BOT_SUPPORT_TOTAL_COUNT;
    }

    /*
    :
        CheckAvailabilityInAdminBot
    :
        playerid - ID ,  
        parmas[] -    
    :
        CA_REQUEST_NOT_FOUND -   
        CA_REQUEST_FOUND -  /
        CA_NO_PLACE_IN_REQUEST -    
        CA_MISSING_ARGUMENT -    
        CA_INVALID_TARGET_ID -    
    :
           . 
    */

    stock CheckAvailabilityInAdminBot(playeridparams[])
    {
        new
            
    bool:IsFinedCommand false,

            
    strFindPos,

            
    supportCommand[MAX_ADMIN_BOT_REQUEST_LENGTH 1],
            
    supportTargetid,
            
    supportTime,
            
    supportReason[MAX_ADMIN_BOT_PUNISH_REASON 1],
            
    supportUnixtTime gettime(),

            
    string[MAX_CHATBUBBLE_LENGTH 1]
        ;

        for(new 
    0MAX_ADMIN_BOT_REQUEST; ++i)
        {
            if((
    strFindPos strfind(paramsADMIN_BOT_SUPPORT_COMMAND[i], true)) != -1)
            {
                if(
    CountRequestInAdminBotList() >= MAX_ADMIN_BOT_SUPPORT_COUNT)
                    return 
    CA_NO_PLACE_IN_REQUEST;

                
    strdel(params0strFindPos);

                if(
    sscanf(params"s[8]uds[50]",
                    
    supportCommandsupportTargetidsupportTimesupportReason))
                    return 
    CA_MISSING_ARGUMENT;
                
                if(
    supportTargetid == INVALID_PLAYER_ID)
                    return 
    CA_INVALID_TARGET_ID;
            

                for(new 
    0MAX_ADMIN_BOT_SUPPORT_COUNT++)
                {
                    if(!
    IsEmptyRequestInAdminBotList(j))
                        continue;
                    
                    
    format(stringsizeof string"[ADMIN-BOT] {FFFFFF}%s  %s  %s  %d , : %s",
                        
    PlayerName(playerid), 
                        
    ADMIN_BOT_PUNISH_NAME[i], 
                        
    PlayerName(supportTargetid),
                        
    supportTime,
                        
    supportReason
                    
    );
                    
    SendAdminMessage(ADMIN_BOT_HEX_COLORstring);

                    
    SendAdminMessage(ADMIN_BOT_HEX_COLOR, !" Y  , N  . (/viewreq    )");

                    
    SetRequestInAdminBotList(
                        
    j
                        
    i
                        
    supportTime
                        
    playerid
                        
    supportTargetid
                        
    supportUnixtTime
                        
    supportReason
                    
    );

                    
    IsFinedCommand true;

                    break;
                }
                break;
            }
        }

        return (
    IsFinedCommand CA_REQUEST_FOUND CA_REQUEST_NOT_FOUND);
    }

    /*
    :
        RejectRequestInAdminBotList
    :
        playerid - ID ,  
        index - ID 
    :
        -
    :
         . 
    */

    stock RejectRequestInAdminBotList(playeridindex)
    {
        new
            
    string[MAX_CHATBUBBLE_LENGTH 1];

        
    format(stringsizeof string"[ADMIN-BOT] {FFFFFF}%s   %d",
            
    PlayerName(playerid), index 1);
        
    SendAdminMessage(ADMIN_BOT_HEX_COLORstring);

        
    format(stringsizeof string"(: %s | : %s | : %s | : %s)",
            
    PlayerName(AdminBotInfo[index][aBot_targetid]),
            
    ADMIN_BOT_PUNISH_NAME[AdminBotInfo[index][aBot_punish_type]],
            
    PlayerName(AdminBotInfo[index][aBot_adminid]),
            
    AdminBotInfo[index][aBot_punish_reason]
        );
        
    SendAdminMessage(ADMIN_BOT_HEX_COLORstring);

        
    DeleteRequestInAdminBotList(index);
    }

    /*
    :
        ApproveRequestInAdminBotList
    :
        playerid - ID ,  
        index - ID 
    :
        -
    :
         . 
    */

    stock ApproveRequestInAdminBotList(playeridindex)
    {
        new
            
    string[MAX_CHATBUBBLE_LENGTH 1];

        
    format(stringMAX_CHATBUBBLE_LENGTH 1"%s %d %d %s // %s",
                
    ADMIN_BOT_SUPPORT_COMMAND[AdminBotInfo[index][aBot_punish_type]],
                
    AdminBotInfo[index][aBot_targetid],
                
    AdminBotInfo[index][aBot_punish_time],
                
    AdminBotInfo[index][aBot_punish_reason],
                
    PlayerName(AdminBotInfo[index][aBot_adminid])
        );
        
    PC_EmulateCommand(playeridstring);

        
    DeleteRequestInAdminBotList(index);
    }

    /*
    :
        IsEmptyRequestInAdminBotList
    :
        index - ID 
    :
        1 -  
        0 -   
    :
        ,   . 
    */

    stock IsEmptyRequestInAdminBotList(index)
    {
        return ((
    AdminBotInfo[index][aBot_punish_reason][0] == '\0') ? (1) : (0));
    }

    /*
    :
        DeleteRequestInAdminBotList
    :
        index - ID 
    :
        1 -   
        0 -    
    :
           . 
    */

    stock DeleteRequestInAdminBotList(index)
    {
        if(!
    IsEmptyRequestInAdminBotList(index))
        {
            
    AdminBotInfo[index][aBot_targetid] = INVALID_PLAYER_ID;
            
    AdminBotInfo[index][aBot_punish_reason][0] = '\0';

            
    gADMIN_BOT_SUPPORT_TOTAL_COUNT --;

            return 
    1;
        }
        else
        {
            return 
    0;
        }
    }

    /*
    :
        SetRequestInAdminBotList
    :
        index - ID 
        type -   (  ..)
        &time -   
        &adminid - ID ,  
        &targetid - ID 
        &unix_time - Unix     
        reason[] -  
        size -     (- ) 
    :
        -
    :
            
    */

    stock SetRequestInAdminBotList(indextype, &time, &adminid, &targetid, &unix_timereason[], const size sizeof reason)
    {
        
    AdminBotInfo[index][aBot_punish_type] = type;
        
    AdminBotInfo[index][aBot_punish_time] = time;

        
    strmid(
            
    AdminBotInfo[index][aBot_punish_reason],
            
    reason,
            
    0,
            
    MAX_ADMIN_BOT_PUNISH_REASON,
            
    size
        
    );
        
        
    AdminBotInfo[index][aBot_targetid] = targetid;
        
    AdminBotInfo[index][aBot_adminid] = adminid;
        
    AdminBotInfo[index][aBot_unix_time] = unix_time;

        
    gADMIN_BOT_SUPPORT_TOTAL_COUNT ++;

    []



    PHP :
    CMD:viewreq(playerid//    
    {
        if(!
    AdminLevel(playerid)) 
            return 
    1CheckAdminLevel(playeridCMD_ADMIN_viewreq);

        if(
    CountRequestInAdminBotList() == MIN_ADMIN_BOT_SUPPORT_COUNT)
            return 
    SendClientMessage(playerid, -1, !"  .");

         
    ShowPlayerAdminBotRequestList(playerid

        return 
    1;
    }

    CMD:admin(playeridparams[]) // -
    {
        if(
    AdminLevel(playerid))
        {
            if(!(
    strlen(params) < 90))
                return 
    SendClientMessage(playerid, -1, !"  1    90");

            new
                
    string[128];

            
    format(stringsizeof(string), "[A] %s [%d]: %s"PlayerName(playerid), playeridparams);
            
    SendAdminMessage(-1string);

            new
                
    ret CheckAvailabilityInAdminBot(playeridparams),
                
    retrunMessage[][] =
                {
                    !
    "    ",
                    !
    "    ",
                    !
    "     .",
                    !
    "   . (: /mute (Id/Nick) (Time) (Reason)",
                    !
    "    ."
                
    }
            ;

            
    SendClientMessage(playerid, -1retrunMessage[ret]);
        }

        return 
    1;
    }
    alias:admin("a"); 
    []

    OnDialogResponse


    PHP :
    case dAbotreqinfo:
    {
        return 
    ShowPlayerAdminBotRequestMenu(playerid);
    }

    case 
    dAbotreqmenu:
    {
        if(!
    response)
        {
            
    pAdminChoseRequest{playerid} = ADMIN_BOT_INVALID_REQUEST_ID;

            return 
    1;
        }

        if(
    IsEmptyRequestInAdminBotList(pAdminChoseRequest{playerid}))
            return 
    SendClientMessage(playerid, -1, !"   ");
        
        new
            
    count pAdminChoseRequest{playerid};

        switch(
    listitem)
        {
            case 
    0:
            {
                if(
    ADMIN_BOT_LEVEL_USING_CMD[AdminBotInfo[count][aBot_punish_type]] > AdminLevel(playerid))
                {
                    
    pAdminChoseRequest{playerid} = ADMIN_BOT_INVALID_REQUEST_ID;

                    return 
    SendClientMessage(playerid, -1, !"    .");
                }
                
                
    pAdminChoseRequest{playerid} = ADMIN_BOT_INVALID_REQUEST_ID;

                
    ApproveRequestInAdminBotList(playeridcount);

                return 
    1;
            }
            case 
    1:
            {
                return 
    ShowPlayerAdminBotRequestInfo(playerid);
            }
            case 
    2:
            {

                if((
    AdminBotInfo[count][aBot_adminid] != playerid
                && (
    ADMIN_BOT_LEVEL_USING_CMD[AdminBotInfo[count][aBot_punish_type]] > AdminLevel(playerid)))
                {
                    
    pAdminChoseRequest{playerid} = ADMIN_BOT_INVALID_REQUEST_ID;

                    return 
    SendClientMessage(playerid, -1, !"    ");
                }
                
                
    pAdminChoseRequest{playerid} = ADMIN_BOT_INVALID_REQUEST_ID;

                
    RejectRequestInAdminBotList(playeridcount);

                return 
    1;
            }
        }
        return 
    1;
    }

    case 
    dAbotreqlist:
    {
        if(!
    response)
            return 
    1;
        
        new
            
    count PlayerListitem[playerid][listitem];

        if(
    IsEmptyRequestInAdminBotList(count))
        {
            
    SendClientMessage(playerid, -1, !"   ");
            return 
    ShowPlayerAdminBotRequestList(playerid);
        }

        
    pAdminChoseRequest{playerid} = count;
        
        return 
    ShowPlayerAdminBotRequestMenu(playerid);

    []


    OnPlayerConnect


    PHP :
    pAdminChoseRequest{playerid} = ADMIN_BOT_INVALID_REQUEST_ID
    []


    OnPlayerDisconnect


    PHP :
        if(CountRequestInAdminBotList() != MIN_ADMIN_BOT_SUPPORT_COUNT//     
        
    {
            for(new 
    iter 0iter MAX_ADMIN_BOT_SUPPORT_COUNTiter ++) //   
            
    {
                if(
    AdminBotInfo[iter][aBot_adminid] != playerid && AdminBotInfo[iter][aBot_targetid] != playerid//  ID    ,     - 
                    
    continue;
                
                
    DeleteRequestInAdminBotList(iter); //  
            
    }
        } 
    []


    OnPlayerKeyState


    PHP :
    if(newkeys KEY_NO)
    {
        if(
    CountRequestInAdminBotList() != MIN_ADMIN_BOT_SUPPORT_COUNT)
        {
            if(
    AdminLevel(playerid))
            {
                new
                    
    iter GetLastRequestInAdminBot();

                if(
    iter != -1)
                {
                    if(
    ADMIN_BOT_LEVEL_USING_CMD[AdminBotInfo[iter][aBot_punish_type]] > AdminLevel(playerid))
                    {
                        
    SendClientMessage(playerid, -1, !"    .");

                        return 
    1;
                    }
                    
                    
    RejectRequestInAdminBotList(playeriditer);

                    return 
    1;
                }
            }
        }
    }

    if(
    newkeys KEY_YES)
    {
        if(
    CountRequestInAdminBotList() != MIN_ADMIN_BOT_SUPPORT_COUNT)
        {
            if(
    AdminLevel(playerid))
            {
                new
                    
    iter GetLastRequestInAdminBot();

                if(
    iter != -1)
                {    
                    if(
    ADMIN_BOT_LEVEL_USING_CMD[AdminBotInfo[iter][aBot_punish_type]] > AdminLevel(playerid))
                    {
                        
    SendClientMessage(playerid, -1, !"    .");

                        return 
    1;
                    }
                    
                    
    ApproveRequestInAdminBotList(playeriditer);
                }
            }
        }

    []


    /


    SendAdminMessage



    PHP :
    new 
        
    Iterator:Connect_Admin<MAX_PLAYERS>; //  ,      
    /
    PHP :
    if(!Iter_Contains(Connect_Admin/**/)) Iter_Add(Connect_Admin/**/); 
    /
    PHP :
    if(Iter_Contains(Connect_Admin/**/)) Iter_Remove(Connect_Admin/**/); 

    PHP :
    stock SendAdminMessage(color, const string[])
    {
        foreach(new 
    Connect_Admin)
        {
            
    SendClientMessage(icolorstring);
        }
        return 
    1;

    []


    PHP :
    #define PlayerName(%0)                 /*    */
    #define AdminLevel(%0)                /*   -*/ 
    []
    []
    execution; 11.05.2019 17:36.
  2. 3 c execution :

    $Blade# (10.05.2019), Iwka (11.05.2019), whale (11.05.2019)

  3. #2
    /proger/

      whale

    :
    :20.09.2013
    :974
    :351 [+/-] 
    , , , .

    , :

    CA_REQUEST_NOT_FINED => CA_REQUEST_NOT_FOUND
    CA_REQUEST_IS_FINED => CA_REQUEST_FOUND
    CA_MISSING_ARGUMENT => CA_ARGUMENT_MISSED

    :)
  4. 1 c whale :

    execution (11.05.2019)

  5. #3

      execution

    :
    :23.06.2017
    :150
    :18 [+/-] 
    * include
  6. #4

      ihNNNNNify

    :
    :18.06.2014
    :
    :2,333
    :352 [+/-] 
  7. #5
  8. #6

      ihNNNNNify

    :
    :18.06.2014
    :
    :2,333
    :352 [+/-] 
  9. #7
  10. #8

      execution

    :
    :23.06.2017
    :150
    :18 [+/-] 
    up(5sim)

, : 76

(, , , , , ), , .
!
samp-rp advanvce pawn s0beit cs 1.6 0.3x World of Tanks samp-rp, samp-rp, - PAWNO SA-MP IV-MP MTA cleo s0beit sobeit sa-mp sa-mp pawno pawno pawno iv-mp iv-mp iv-mp godfather SAMP gta 4 4 GTA 4 GTA 4 GTA 4 SAMP SAMP Pen1 LS Pen1 Fugitive The Godfather rp roleplay samp-rp sa-mp sa-mp pawno gta-iv gta-v gta-sa gta-3 gta-III gta-4 gta-5 gta-vc mta mta-dm mta-race mta-sa pawno info ru pawno pawno gta-iv gta-iv gta-v gta-v gta-iv keygen gta sa gta 4 multiplayer gta san adnreas multiplayer sa-mp forum sa-mp pawno sa-mp pawno sa-mp gta-sa pawno pawno errors sa-mp 0.3c SA-MP 0.3d 4 GTA 4 GTA 4 GTA 4 SAMP SAMP Pen1 LS Pen1 Fugitive The Godfather SAMP hack rat android instagram twitter ddos root linux ubuntu mac android advance arizona 4g