Jump to content

Ajutor daca se poate.


PUTEREA URSULUI

Recommended Posts

Nume : amx_who plughin


Versiune : care sa se  vada in consola la server


Descriere detaliata : am bagat un amx_who cu ini cu tot si nu mi se vad gradele cand dau amx_who in consola 


as vrea daca sa poate sa ma ajutati cu plughinul neceasar care sa mearga.


as dori gradele urmatoare daca se poate.


 


 


http://www.girlshare.ro/3489082822.5


 


 


 


Link to comment
Share on other sites

 

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Who meniu"
#define VERSION "1.0"
#define AUTHOR "Askwrite" // Modificat de SnowFake

#define GRUPURI 6
new const TITLU[] = " \r- \y[ \rXMAS.RANGFORT.RO \w- \rAdmins \y] \r-";
new const  IESIRE[] = "\r0. \yExit";
new const NOADMINS[] = "\rNo admins";
#pragma semicolon 1

new g_NumeGrade[ GRUPURI ][ ] = {
    
    "\rMos Craciun",
    "\rMos Nicolae",
    "\rElf",
    "\rRen",
    "\rCopil Cuminte",
        "\rSlot"
};

new g_Flaguri[ GRUPURI ][ ] = {
    
    "abcdefghijklmnopqrstu",
    "bcdefghijklmnopqrstu",
    "bcdefghijklmnopqrsu",
    "bcdefghijklmnotu",
    "bcdefghijklmno",
        "b"
    
};


new g_ValueFlaguri[ GRUPURI ];

public plugin_init( ) {
    
    register_plugin( PLUGIN, VERSION, AUTHOR );
    for( new i = 0 ; i < GRUPURI ; i++ )
        g_ValueFlaguri[ i ] = read_flags( g_Flaguri[ i ] );
    
    register_clcmd("say /who", "cmdWho");
    register_clcmd("say who", "cmdWho");
    register_clcmd("say_team who", "cmdWho");
    register_clcmd("say_team /who", "cmdWho");
    register_clcmd("say /admin", "cmdWho");
    register_clcmd("say_team /admin", "cmdWho");
    register_clcmd("say /admins", "cmdWho");
    register_clcmd("say_team /admins", "cmdWho");
    register_clcmd("say /admini", "cmdWho");
    register_clcmd("say_team /admini", "cmdWho");
    
    
}

public cmdWho( id, page ) {
    
    new MenuName[ 64 ], MenuExitKey[ 32 ];
    
    formatex( MenuName, sizeof ( MenuName ) -1, "%s",  TITLU );
    
    formatex( MenuExitKey, sizeof ( MenuExitKey ) -1, "%s",  IESIRE );
    
    new menu = menu_create(MenuName, "InchidereMeniu");   
    
    if( AdminiON(    )  )
    {
        
        for( new i = 0; i < GRUPURI; i++  )
        {
            AdaugareA( id, menu, i );
        }
    }
    else
    {
        menu_additem( menu, NOADMINS , "1", 0 );
    }
    
    menu_setprop(menu, MPROP_EXITNAME, MenuExitKey );
    
    menu_display(id, menu, page);
    
}


public InchidereMeniu(id, menu, item) {
    if(item == MENU_EXIT)
    {
        menu_destroy( menu );
        return 1;
    }
    
    new data[6], iName[64];
    new iaccess, callback;
    
    menu_item_getinfo(menu, item, iaccess, data,5, iName, 63, callback);
    
    new key = str_to_num(data);
    
    switch(key)
    {
        case 1,2,3,4,5,6,7:
        {
            menu_destroy( menu );
            return 1;
        }
    }
    
    return 0;
}

public AdaugareA( const id, const menu,  const group  ) {
    
    new AdminMenuMessage[ 32 ][ 64 ],AdminMenuKey[ 32 ][ 32 ], MenuKey = 1;
    
    static Players[ 32 ], Num, Player;
    get_players( Players, Num, "ch" );
    
    for( new x = 0 ; x < Num ; x++ )
    {   
        Player = Players[ x ];
        if( get_user_flags( Player ) == g_ValueFlaguri[ group ] )
        {
            
            formatex( AdminMenuMessage[ MenuKey ], sizeof ( AdminMenuMessage[ ] ) -1, " \w%s \y\w%s%s  ",
            gName( Player ), g_NumeGrade[ group ], Player == id ? "\r *" : "" );
            
            formatex( AdminMenuKey[ MenuKey ], sizeof ( AdminMenuKey[ ] ) -1, "%d", MenuKey );
            
            MenuKey++;
        }
    }
    
    for( new z = 1 ; z < MenuKey ; z++ )
    {
        
        menu_additem( menu, AdminMenuMessage[ z ], AdminMenuKey[ z ], 0 );
    }
    
}

stock bool:AdminiON(    ) {
    new bool:AGasiti = false;
    
    static Players[ 32 ], Num, Player;
    get_players( Players, Num, "ch" );
    
    for( new x = 0 ; x < Num ; x++ )
    {   
        Player = Players[ x ];
        for( new i = 0 ; i < GRUPURI ; i++ )
        {
            if( AGasiti ) break;
            if( get_user_flags( Player ) == g_ValueFlaguri[ i ] )
            {
                AGasiti = true;
            }
        }
    }
    
    return AGasiti ? true : false;
}

stock gName( id ) {
    
    new name[ 32 ];
    get_user_name( id, name, sizeof ( name ) -1 );
    
    return name;
}

 

 

 

; ##################################################
 ; == USERS.INI ~ XMAS.RANGFORT.RO ~ XMAS OUTSTANDING ==
 ; ##################################################

 ; =================================================
 ; --- [ 1 ] Mos Craciun - abcdefghijklmnopqrstu ---
 ; =================================================


 ; =================================================
 ; --- [ 2 ] Mos Nicolae - bcdefghijklmnopqrstu  ---
 ; =================================================
 

 ; =================================================
 ; --- [ 3 ] Elf - bcdefghijklmnopqrsu           ---
 ; =================================================



 ; =================================================
 ; --- [ 4 ] Ren - bcdefghijklmnotu              ---
 ; =================================================



 ; =================================================
 ; --- [ 5 ] Copil Cuminte - bcdefghijklmno      ---
 ; =================================================

 ; =================================================
 ; --- [ 6 ] Slot - b                            ---
 ; =================================================



 

 

Ramai dator :P

Acesta e pluginul care ruleaza pe serverul meu de XMAS :P

Link to comment
Share on other sites

 

#include <amxmodx>

#include <amxmisc>

 

#define PLUGIN "Who meniu"

#define VERSION "1.0"

#define AUTHOR "Askwrite" // Modificat de SnowFake

 

#define GRUPURI 6

new const TITLU[] = " \r- \y[ \rXMAS.RANGFORT.RO \w- \rAdmins \y] \r-";

new const  IESIRE[] = "\r0. \yExit";

new const NOADMINS[] = "\rNo admins";

#pragma semicolon 1

 

new g_NumeGrade[ GRUPURI ][ ] = {

    

    "\rMos Craciun",

    "\rMos Nicolae",

    "\rElf",

    "\rRen",

    "\rCopil Cuminte",

        "\rSlot"

};

 

new g_Flaguri[ GRUPURI ][ ] = {

    

    "abcdefghijklmnopqrstu",

    "bcdefghijklmnopqrstu",

    "bcdefghijklmnopqrsu",

    "bcdefghijklmnotu",

    "bcdefghijklmno",

        "b"

    

};

 

 

new g_ValueFlaguri[ GRUPURI ];

 

public plugin_init( ) {

    

    register_plugin( PLUGIN, VERSION, AUTHOR );

    for( new i = 0 ; i < GRUPURI ; i++ )

        g_ValueFlaguri[ i ] = read_flags( g_Flaguri[ i ] );

    

    register_clcmd("say /who", "cmdWho");

    register_clcmd("say who", "cmdWho");

    register_clcmd("say_team who", "cmdWho");

    register_clcmd("say_team /who", "cmdWho");

    register_clcmd("say /admin", "cmdWho");

    register_clcmd("say_team /admin", "cmdWho");

    register_clcmd("say /admins", "cmdWho");

    register_clcmd("say_team /admins", "cmdWho");

    register_clcmd("say /admini", "cmdWho");

    register_clcmd("say_team /admini", "cmdWho");

    

    

}

 

public cmdWho( id, page ) {

    

    new MenuName[ 64 ], MenuExitKey[ 32 ];

    

    formatex( MenuName, sizeof ( MenuName ) -1, "%s",  TITLU );

    

    formatex( MenuExitKey, sizeof ( MenuExitKey ) -1, "%s",  IESIRE );

    

    new menu = menu_create(MenuName, "InchidereMeniu");   

    

    if( AdminiON(    )  )

    {

        

        for( new i = 0; i < GRUPURI; i++  )

        {

            AdaugareA( id, menu, i );

        }

    }

    else

    {

        menu_additem( menu, NOADMINS , "1", 0 );

    }

    

    menu_setprop(menu, MPROP_EXITNAME, MenuExitKey );

    

    menu_display(id, menu, page);

    

}

 

 

public InchidereMeniu(id, menu, item) {

    if(item == MENU_EXIT)

    {

        menu_destroy( menu );

        return 1;

    }

    

    new data[6], iName[64];

    new iaccess, callback;

    

    menu_item_getinfo(menu, item, iaccess, data,5, iName, 63, callback);

    

    new key = str_to_num(data);

    

    switch(key)

    {

        case 1,2,3,4,5,6,7:

        {

            menu_destroy( menu );

            return 1;

        }

    }

    

    return 0;

}

 

public AdaugareA( const id, const menu,  const group  ) {

    

    new AdminMenuMessage[ 32 ][ 64 ],AdminMenuKey[ 32 ][ 32 ], MenuKey = 1;

    

    static Players[ 32 ], Num, Player;

    get_players( Players, Num, "ch" );

    

    for( new x = 0 ; x < Num ; x++ )

    {   

        Player = Players[ x ];

        if( get_user_flags( Player ) == g_ValueFlaguri[ group ] )

        {

            

            formatex( AdminMenuMessage[ MenuKey ], sizeof ( AdminMenuMessage[ ] ) -1, " \w%s \y\w%s%s  ",

            gName( Player ), g_NumeGrade[ group ], Player == id ? "\r *" : "" );

            

            formatex( AdminMenuKey[ MenuKey ], sizeof ( AdminMenuKey[ ] ) -1, "%d", MenuKey );

            

            MenuKey++;

        }

    }

    

    for( new z = 1 ; z < MenuKey ; z++ )

    {

        

        menu_additem( menu, AdminMenuMessage[ z ], AdminMenuKey[ z ], 0 );

    }

    

}

 

stock bool:AdminiON(    ) {

    new bool:AGasiti = false;

    

    static Players[ 32 ], Num, Player;

    get_players( Players, Num, "ch" );

    

    for( new x = 0 ; x < Num ; x++ )

    {   

        Player = Players[ x ];

        for( new i = 0 ; i < GRUPURI ; i++ )

        {

            if( AGasiti ) break;

            if( get_user_flags( Player ) == g_ValueFlaguri[ i ] )

            {

                AGasiti = true;

            }

        }

    }

    

    return AGasiti ? true : false;

}

 

stock gName( id ) {

    

    new name[ 32 ];

    get_user_name( id, name, sizeof ( name ) -1 );

    

    return name;

}

 

 

 

; ##################################################

 ; == USERS.INI ~ XMAS.RANGFORT.RO ~ XMAS OUTSTANDING ==

 ; ##################################################

 

 ; =================================================

 ; --- [ 1 ] Mos Craciun - abcdefghijklmnopqrstu ---

 ; =================================================

 

 

 ; =================================================

 ; --- [ 2 ] Mos Nicolae - bcdefghijklmnopqrstu  ---

 ; =================================================

 

 

 ; =================================================

 ; --- [ 3 ] Elf - bcdefghijklmnopqrsu           ---

 ; =================================================

 

 

 

 ; =================================================

 ; --- [ 4 ] Ren - bcdefghijklmnotu              ---

 ; =================================================

 

 

 

 ; =================================================

 ; --- [ 5 ] Copil Cuminte - bcdefghijklmno      ---

 ; =================================================

 

 ; =================================================

 ; --- [ 6 ] Slot - b                            ---

 ; =================================================

 

 

 

 

 

 

Ramai dator :P

Acesta e pluginul care ruleaza pe serverul meu de XMAS :P

Nu o sa- i functioneze.

Dani pentru a-ti functiona amx_who in consola, trebuie modificat pluginul admincmd.

Lasa-mi reply cu gradele dorite/accessele si  pluginul pe care-l utilizezi(amx_who, ultimate_who) si ti-l voi modifica eu .

Edited by M1r3l
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...