SAPE ERROR: Не могу подключиться к серверу: dispenser-01.saperu.net/code.php?user=836f97673aa6aa25a35b5029263ee232&host=amxxmodx.ru&charset=windows-1251&format=serialize, type: file_get_contents

SAPE ERROR: Не могу подключиться к серверу: dispenser-02.saperu.net/code.php?user=836f97673aa6aa25a35b5029263ee232&host=amxxmodx.ru&charset=windows-1251&format=serialize, type: file_get_contents

13. . » AmxModX
| |
 RSS
  • OnLine

    : 5
    : 4
    : -
    : crawl Bot

    ?

    • AMX Mod X
    • up.org.ua


  • : Admin : 19-02-2012, 15:34 : 8503

    13. .

    .

    , . , .

    ?
    . , :
    new bool:g_bFuncUse [33] = false

    . / . , , , :
    if(g_bFuncUse[id]){
        //
    }else{
        //
    }

    , ? , ! . , say :
    register_clcmd("say","fOnOff")
    ...
    public fOnOff(id){
        //
        new args[10]
        read_args(args,9)
        remove_quotes(args)
        
        // /off
        if(equal(args, "/off", 4)){
            g_bFuncUse[id] = false
            client_print(id,print_chat,"[scripts] Cmd disable")        
        }
        // /on    
        if(equal(args, "/on", 4)){
            g_bFuncUse[id] = true
            client_print(id,print_chat,"[scripts] Cmd is activated")
        }
    }

    , say /on say /off.

    , , , :
    public client_connect(id){
        g_bFuncUse[id] = false
    }

    , , .

    , / .
    , , , , , :

    /* Plugin generated by AMXX-Studio */

    #include <amxmodx>
    #include <amxmisc>
    #include <fun>
    #include <fakemeta>
    #include <hamsandwich>

    new const MAXBPAMMO[] = { -1, 52, -1, 90, 1, 32, 1, 100, 90, 1, 120, 100, 100, 90, 90, 90, 100, 120,
    30, 120, 200, 32, 90, 120, 90, 2, 35, 90, 90, -1, 100 }

    new const MAXCLIP[] = { -1, 13, -1, 10, -1, 7, -1, 30, 30, -1, 30, 20, 25, 30, 35, 25, 12, 20,
    10, 30, 100, 8, 30, 30, 20, -1, 7, 30, 30, -1, 50 }


    #define PLUGIN "[scripts] on/off function"
    #define VERSION "1.0"
    #define AUTHOR "Admin"

    new bool:g_bFuncUse[33] = false

    public plugin_init()
    {
        register_plugin(PLUGIN, VERSION, AUTHOR)
        
        register_clcmd("say","fOnOff")
        register_message(get_user_msgid("CurWeapon"), "messageCurWeapon")
        
        
    }
    public fOnOff(id){
        new args[10]
        read_args(args,9)
        remove_quotes(args)
        
        if(equal(args, "/off", 4)){
            g_bFuncUse[id] = false
            client_print(id,print_chat,"[scripts] Cmd disable")    
            
            set_user_gravity(id,1.0)
        }
        
        if(equal(args, "/on", 4)){
            g_bFuncUse[id] = true
            client_print(id,print_chat,"[scripts] Cmd is activated")
            
            set_user_gravity(id,0.5)
        }
    }
    public client_connect(id){
        g_bFuncUse[id] = false
    }
    public messageCurWeapon(msg_id, msg_dest, msg_entity){
        
        if(!g_bFuncUse[msg_entity])
            return PLUGIN_CONTINUE
        
        if(get_msg_arg_int(1) != 1)
            return PLUGIN_CONTINUE
        
        static weapon
        weapon = get_msg_arg_int(2)
        
        if(MAXBPAMMO[weapon] > 2){
            set_pdata_int(get_pdata_cbase(msg_entity, 373), 51, MAXCLIP[weapon], 4)
            set_msg_arg_int(3, get_msg_argtype(3), MAXCLIP[weapon])
        }
        return PLUGIN_CONTINUE
    }    


    messageCurWeapon, /.
    :
       :
    ...

    ...

    :
        if(!g_bFuncUse[msg_entity])
            return PLUGIN_CONTINUE

    , return PLUGIN_CONTINUE, .

    , :
    public messageCurWeapon(msg_id, msg_dest, msg_entity){
        
        if(g_bFuncUse[msg_entity]){
            
            
            if(get_msg_arg_int(1) != 1)
                return
            
            static weapon
            weapon = get_msg_arg_int(2)
            
            if(MAXBPAMMO[weapon] > 2){
                set_pdata_int(get_pdata_cbase(msg_entity, 373), 51, MAXCLIP[weapon], 4)
                set_msg_arg_int(3, get_msg_argtype(3), MAXCLIP[weapon])
            }
        }
    }

    , "" , , , , .

    , , , .
    :
    register_clcmd("say /megakomanda","fOnOff")

    :
    public fOnOff(id){
        if(g_bFuncUse[id]){
            g_bFuncUse[id] = false
            client_print(id,print_chat,"[scripts] Cmd disable")  
        }else{
            g_bFuncUse[id] = true
            client_print(id,print_chat,"[scripts] Cmd is activated")
        }
    }


    / , .
    , .
    .
    13. .
    lenarsaitov

    --
    ICQ: --
    : 0
    : 0
    : -  0  +

    lol
    defa

    --
    ICQ: --
    : 0
    : 0
    : -  0  +

    new bool:g_bFuncUse [32] = false -> new bool:g_bFuncUse[33] = false smile
    Admin

    30.07.2011
    ICQ: 980500
    : 507
    : 333
    : -  58  +

    ? ?
    , 32 .

    /* Plugin generated by AMXX-Studio */

    #include <amxmodx>
    #include <amxmisc>

    #define PLUGIN "New Plug-In"
    #define VERSION "1.0"
    #define AUTHOR "Admin"


    public plugin_init() {
        register_plugin(PLUGIN, VERSION, AUTHOR)

        register_clcmd("say /t","test")
        
    }
    public test(id){
        

        new mas[32]
        
        for(new i = 0; i < 32; i++){
            
            mas[i] = i+100
        
            console_print(0,"id:
    %d",i)
            
        }
        
        console_print(0,"----------------------------
    4;)
        
        for(new i = 0; i < 32; i++){
            
            console_print(0,"id:
    %d",mas[i])
            
        }
        
    }


    ) !
    --------------------
    Legenda

    --
    ICQ: --
    : 0
    : 0
    : -  0  +

    , . , , ? admin_esp_mini, vault.ini AESPmini_STEAM_0:1:12345678 11. , , , , .
    defa

    --
    ICQ: --
    : 0
    : 0
    : -  0  +

    0 N, g_bFuncUse[0-31], MAX = 32. , .. 32 . :
    error 032: array index out of bounds (variable X)
    Admin

    30.07.2011
    ICQ: 980500
    : 507
    : 333
    : -  58  +

    defa, ?
    32 . 0 ( )
    31 32.
    ...
    , ...
    --------------------
    defa

    --
    ICQ: --
    : 0
    : 0
    : -  0  +

    , Id , Id = 32, => g_bFuncUse[id] = g_bFuncUse[32], 32 .
    Admin

    30.07.2011
    ICQ: 980500
    : 507
    : 333
    : -  58  +

    , .
    id 1 = mas[0]
    id 2 = mas[2]
    id 32 = mas[31]
    , .
    .
    --------------------
    defa

    --
    ICQ: --
    : 0
    : 0
    : -  0  +

    , , )

    d 1 = mas[0]

    id 2 = mas[2]

    id 32 = mas[31]

    , id , 32 .([32] => 0-31, 32 , [33] => 0-32, .
    Admin

    30.07.2011
    ICQ: 980500
    : 507
    : 333
    : -  58  +

    )
    32 33 :)

    32 , ...

    , , 33 )
    :)
    --------------------

    , , .