This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[REQ] Admin Menu CS 1.6


Post New Thread Reply   
 
Thread Tools Display Modes
Ex1ne
Senior Member
Join Date: Oct 2011
Location: Norway
Old 01-19-2012 , 13:57   Re: [REQ] Admin Menu CS 1.6
Reply With Quote #41

Quote:
Originally Posted by drekes View Post
It's not because he has a steam account he's server is steam-only.
If it was non steam, it would say:
Code:
zENK
In Non-Steam Game
dedicated server
Right?
It didn't, it was normal.
__________________

Last edited by Ex1ne; 01-19-2012 at 13:57.
Ex1ne is offline
zENK
Member
Join Date: Aug 2011
Old 01-19-2012 , 13:59   Re: [REQ] Admin Menu CS 1.6
Reply With Quote #42

Quote:
Originally Posted by drekes View Post
Is your server non-steam ?
I'm not using a non-steam server. I'm using the real one from steam.
zENK is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 01-19-2012 , 14:03   Re: [REQ] Admin Menu CS 1.6
Reply With Quote #43

Quote:
Originally Posted by Ex1ne View Post
If it was non steam, it would say:
Code:
zENK
In Non-Steam Game
dedicated server
Right?
It didn't, it was normal.
No, it wouldn't say that.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 01-19-2012 , 14:37   Re: [REQ] Admin Menu CS 1.6
Reply With Quote #44

Try this:

PHP Code:
#define COLORCHAT

#include <amxmodx>
#include <hamsandwich>
#include <cstrike>

#if defined COLORCHAT
    #include <colorchat>
#endif

#pragma semicolon    1
#define VERSION     "1.0.0"

new const g_szPrefix[] = "AMXX";

enum eCurrentMenu
{
    
None
    
Ban
    
Kick
    
Slap
    
Slay
    
Transfer
};

new const 
g_szMenuOptions[eCurrentMenu][] = 
{
    
""
    
"Ban"
    
"Kick"
    
"Slap"
    
"Slay"
    
"Transfer"
};

    
new 
eCurrentMenug_ChosenMenu[33]
    , 
g_iMainMenu
;


public 
plugin_init()
{
    
register_plugin("Admin Menu"VERSION"Drekes");
    
    
register_clcmd("say /adminmenu""CmdAdminMenu"ADMIN_CFG);
    
    new 
szData[64];
    
formatex(szDatacharsmax(szData), "\y[\r%s\y]\w Admin Menu"g_szPrefix);
    
    
g_iMainMenu menu_create(szData"HandleMainMenu");
    for(new 
eCurrentMenuBaneCurrentMenui++)
    {
        
formatex(szDatacharsmax(szData), "%s menu"g_szMenuOptions[i]);
        
menu_additem(g_iMainMenuszData"");
    }
}


public 
CmdAdminMenu(idiLevel)
{
    if(
get_user_flags(id) & iLevel)
        
menu_display(idg_iMainMenu);

    else
        Print(
id"You don't have access to this command!");
    return 
PLUGIN_HANDLED;
}


public 
HandleMainMenu(idiMenuiItem)
{
    if(
iItem != MENU_EXIT)
    {
        
g_ChosenMenu[id] = eCurrentMenu: (iItem 1);
        
ShowPlayerMenu(id);    
    }

    return 
PLUGIN_HANDLED;
}


ShowPlayerMenu(id)
{
    new 
iPlayers[32]
        , 
iNum
        
iMenu
        
szName[32]
    ;
    
    
formatex(szNamecharsmax(szName), "%s menu:"g_szMenuOptions[g_ChosenMenu[id]]);
    
iMenu menu_create(szName"HandlePlayerMenu");
    
    switch(
g_ChosenMenu[id])
    {
        case 
SlapSlay:
            
get_players(iPlayersiNum"a");
            
        default:
            
get_players(iPlayersiNum);
    }
    
    for(new 
0iNumi++)
    {
        
get_user_name(iPlayers[i], szNamecharsmax(szName));
        
menu_additem(iMenuszName"");
    }
    
    
menu_display(idiMenu);
}


public 
HandlePlayerMenu(idiMenuiItem)
{
    if(
iItem != MENU_EXIT)
    {
        new 
iAccess
            
szCmd[11]
            , 
szName[32]
            , 
iCallback
            
iPlayer
        
;

        
menu_item_getinfo(iMenuiItemiAccessszCmdcharsmax(szCmd)
            , 
szNamecharsmax(szName), iCallback);
        
        if((
iPlayer find_player("a"szName)))
        {
            new 
szAdminName[32];
            
get_user_name(idszAdminNamecharsmax(szName));
            
            switch(
g_ChosenMenu[id])
            {
                case 
Ban:
                {
                    
copy(szCmdcharsmax(szCmd), "banned");                
                    
server_cmd("banid ^"#%d^" ^"30^" ^"Banned by ADMIN %s^"", get_user_userid(iPlayer), szAdminName);
                
}
                
                case 
Kick:
                {
                    
copy(szCmdcharsmax(szCmd), "kicked");
                    
server_cmd("kick ^"#%d^" ^"Kicked by ADMIN %s^"", get_user_userid(iPlayer), szAdminName);
                
}
                
                case 
Slap:
                {
                    
copy(szCmdcharsmax(szCmd), "slapped");
                    
user_slap(iPlayer0);
                }
                
                case 
Slay:
                {
                    
copy(szCmdcharsmax(szCmd), "slayed");
                    
user_kill(iPlayer);
                }
                    
                case 
Transfer:
                {
                    
copy(szCmdcharsmax(szCmd), "transfered");
                    
                    
cs_set_user_team(iPlayercs_get_user_team(iPlayer) == CS_TEAM_T CS_TEAM_CT CS_TEAM_T);
                    
ExecuteHamB(Ham_CS_RoundRespawniPlayer);
                }
            }

            Print(
0"ADMIN ^04%s^01 %s ^04%s"szAdminNameszCmdszName);
        }
        
        else
            Print(
id"The selected player can't be found.");
    }
    
    
g_ChosenMenu[id] = None;
    
    
menu_destroy(iMenu);
    return 
PLUGIN_HANDLED;
}


Print(
id, const szMessage[], any:...)
{
    static 
szBuffer[192];
    
vformat(szBuffercharsmax(szBuffer), szMessage3);

    
#if defined COLORCHAT
        
ColorChat(idGREEN"[%s]^01 %s"g_szPrefixszBuffer);
    
#else
        
replace_all(szBuffercharsmax(szBuffer), "^01""");
        
replace_all(szBuffercharsmax(szBuffer), "^03""");
        
replace_all(szBuffercharsmax(szBuffer), "^04""");
        
        
client_print(idprint_chat"[%s] %s"g_szPrefixszBuffer);
    
#endif

__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
zENK
Member
Join Date: Aug 2011
Old 01-19-2012 , 15:08   Re: [REQ] Admin Menu CS 1.6
Reply With Quote #45

@Ex1ne helped me in TeamViewer, but thank's anyway @drekes
zENK is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 01-19-2012 , 15:33   Re: [REQ] Admin Menu CS 1.6
Reply With Quote #46

You should use drekes plugin instead.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
zENK
Member
Join Date: Aug 2011
Old 01-19-2012 , 16:31   Re: [REQ] Admin Menu CS 1.6
Reply With Quote #47

Quote:
Originally Posted by bibu View Post
You should use drekes plugin instead.
i'll try it =D
zENK is offline
andrzN
Senior Member
Join Date: Jan 2010
Location: Bodø / Norway
Old 01-20-2012 , 05:54   Re: [REQ] Admin Menu CS 1.6
Reply With Quote #48

Quote:
Originally Posted by drekes View Post
Try this:

PHP Code:
#define COLORCHAT

#include <amxmodx>
#include <hamsandwich>
#include <cstrike>

#if defined COLORCHAT
    #include <colorchat>
#endif

#pragma semicolon    1
#define VERSION     "1.0.0"

new const g_szPrefix[] = "AMXX";

enum eCurrentMenu
{
    
None
    
Ban
    
Kick
    
Slap
    
Slay
    
Transfer
};

new const 
g_szMenuOptions[eCurrentMenu][] = 
{
    
""
    
"Ban"
    
"Kick"
    
"Slap"
    
"Slay"
    
"Transfer"
};

    
new 
eCurrentMenug_ChosenMenu[33]
    , 
g_iMainMenu
;


public 
plugin_init()
{
    
register_plugin("Admin Menu"VERSION"Drekes");
    
    
register_clcmd("say /adminmenu""CmdAdminMenu"ADMIN_CFG);
    
    new 
szData[64];
    
formatex(szDatacharsmax(szData), "\y[\r%s\y]\w Admin Menu"g_szPrefix);
    
    
g_iMainMenu menu_create(szData"HandleMainMenu");
    for(new 
eCurrentMenuBaneCurrentMenui++)
    {
        
formatex(szDatacharsmax(szData), "%s menu"g_szMenuOptions[i]);
        
menu_additem(g_iMainMenuszData"");
    }
}


public 
CmdAdminMenu(idiLevel)
{
    if(
get_user_flags(id) & iLevel)
        
menu_display(idg_iMainMenu);

    else
        Print(
id"You don't have access to this command!");
    return 
PLUGIN_HANDLED;
}


public 
HandleMainMenu(idiMenuiItem)
{
    if(
iItem != MENU_EXIT)
    {
        
g_ChosenMenu[id] = eCurrentMenu: (iItem 1);
        
ShowPlayerMenu(id);    
    }

    return 
PLUGIN_HANDLED;
}


ShowPlayerMenu(id)
{
    new 
iPlayers[32]
        , 
iNum
        
iMenu
        
szName[32]
    ;
    
    
formatex(szNamecharsmax(szName), "%s menu:"g_szMenuOptions[g_ChosenMenu[id]]);
    
iMenu menu_create(szName"HandlePlayerMenu");
    
    switch(
g_ChosenMenu[id])
    {
        case 
SlapSlay:
            
get_players(iPlayersiNum"a");
            
        default:
            
get_players(iPlayersiNum);
    }
    
    for(new 
0iNumi++)
    {
        
get_user_name(iPlayers[i], szNamecharsmax(szName));
        
menu_additem(iMenuszName"");
    }
    
    
menu_display(idiMenu);
}


public 
HandlePlayerMenu(idiMenuiItem)
{
    if(
iItem != MENU_EXIT)
    {
        new 
iAccess
            
szCmd[11]
            , 
szName[32]
            , 
iCallback
            
iPlayer
        
;

        
menu_item_getinfo(iMenuiItemiAccessszCmdcharsmax(szCmd)
            , 
szNamecharsmax(szName), iCallback);
        
        if((
iPlayer find_player("a"szName)))
        {
            new 
szAdminName[32];
            
get_user_name(idszAdminNamecharsmax(szName));
            
            switch(
g_ChosenMenu[id])
            {
                case 
Ban:
                {
                    
copy(szCmdcharsmax(szCmd), "banned");                
                    
server_cmd("banid ^"#%d^" ^"30^" ^"Banned by ADMIN %s^"", get_user_userid(iPlayer), szAdminName);
                
}
                
                case 
Kick:
                {
                    
copy(szCmdcharsmax(szCmd), "kicked");
                    
server_cmd("kick ^"#%d^" ^"Kicked by ADMIN %s^"", get_user_userid(iPlayer), szAdminName);
                
}
                
                case 
Slap:
                {
                    
copy(szCmdcharsmax(szCmd), "slapped");
                    
user_slap(iPlayer0);
                }
                
                case 
Slay:
                {
                    
copy(szCmdcharsmax(szCmd), "slayed");
                    
user_kill(iPlayer);
                }
                    
                case 
Transfer:
                {
                    
copy(szCmdcharsmax(szCmd), "transfered");
                    
                    
cs_set_user_team(iPlayercs_get_user_team(iPlayer) == CS_TEAM_T CS_TEAM_CT CS_TEAM_T);
                    
ExecuteHamB(Ham_CS_RoundRespawniPlayer);
                }
            }

            Print(
0"ADMIN ^04%s^01 %s ^04%s"szAdminNameszCmdszName);
        }
        
        else
            Print(
id"The selected player can't be found.");
    }
    
    
g_ChosenMenu[id] = None;
    
    
menu_destroy(iMenu);
    return 
PLUGIN_HANDLED;
}


Print(
id, const szMessage[], any:...)
{
    static 
szBuffer[192];
    
vformat(szBuffercharsmax(szBuffer), szMessage3);

    
#if defined COLORCHAT
        
ColorChat(idGREEN"[%s]^01 %s"g_szPrefixszBuffer);
    
#else
        
replace_all(szBuffercharsmax(szBuffer), "^01""");
        
replace_all(szBuffercharsmax(szBuffer), "^03""");
        
replace_all(szBuffercharsmax(szBuffer), "^04""");
        
        
client_print(idprint_chat"[%s] %s"g_szPrefixszBuffer);
    
#endif


Could you please make the ban action support amxbans ? WOuld've been awesome!

Also, if you got time, add map vote to the menu "4 votes, admin chooses maps from maps listed in mapcycle"

Been looking for this kind of plugin!: p
andrzN is offline
Send a message via MSN to andrzN
deadman909
Veteran Member
Join Date: Oct 2008
Old 01-20-2012 , 19:15   Re: [REQ] Admin Menu CS 1.6
Reply With Quote #49

Quote:
Originally Posted by andrzN View Post
Could you please make the ban action support amxbans ? WOuld've been awesome!

Also, if you got time, add map vote to the menu "4 votes, admin chooses maps from maps listed in mapcycle"

Been looking for this kind of plugin!: p
The map thing is already integrated with the original plugins of the server. Just use the amx mod menu and there should be an option there that says vote for maps.
__________________

deadman909 is offline
Send a message via MSN to deadman909 Send a message via Yahoo to deadman909
zENK
Member
Join Date: Aug 2011
Old 01-22-2012 , 13:32   Re: [REQ] Admin Menu CS 1.6
Reply With Quote #50

Thank you so much for all your help. =D
But, i got some new ideas for the plugins.. and wondering if it's possible to make it looks like this.

AMXX ADMIN-MENU http://bildr.no/view/1086003

Slap-Menu http://bildr.no/view/1086004

Slay-Menu http://bildr.no/view/1086005

Kick-Menu http://bildr.no/view/1086006

Ban-MenuU http://bildr.no/view/1086007
Reason menu http://bildr.no/view/1086008

Maps-Menu http://bildr.no/view/1086009

Revive-Menu http://bildr.no/view/1086010

Transfer-Menu http://bildr.no/view/1086011 KILL ON TRANSFER
Transfer to http://bildr.no/view/1086012

If anyone could make this plugin for me, that would be AWESOME! =)

Last edited by zENK; 01-22-2012 at 14:40.
zENK is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:29.


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