Raised This Month: $165 Target: $400
 41% 

[REQ] Admin Menu CS 1.6


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zENK
Member
Join Date: Aug 2011
Old 01-17-2012 , 16:00   [REQ] Admin Menu CS 1.6
Reply With Quote #1

I'm looking for a admin plugin that contains the following down below:

1. Ban player
2. Kick player
3. Slap player
4. Slay player
5. Transfer player.
And some fun stuff. ;p

Anyone know's a plugin with those things? please write back!
zENK is offline
Ex1ne
Senior Member
Join Date: Oct 2011
Location: Norway
Old 01-17-2012 , 16:18   Re: [REQ] Admin Menu CS 1.6
Reply With Quote #2

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <colorchat>
#include <hamsandwich>
#include <cstrike>
new const VERSION[] = "1.0.0"
new const prefix[] = "[AMXX] Admin menu - "

new szName[33], szPlayerName[33]

public 
plugin_init() 
{
    
register_plugin("Admin menu,"VERSION"Ex1ne")
    
    
register_clcmd("say /adminmenu""CmdAdminMenu")
    
register_clcmd("say /am""CmdAdminMenu")
}

public 
CmdAdminMenu(iPlayer)
{
    if(!(
get_user_flags(iPlayer) & ADMIN_CFG))
    {
        
ColorChat(iPlayerGREY"%s Only^4 Admins^3 can open this menu."prefix)
        return 
PLUGIN_HANDLED
    
}
    
    new 
szText[555 char]
    
formatex(szTextcharsmax(szText), "\yAdmin Menu")
    new 
AdminMenu menu_create(szText"AdminMenuHandle")
    
    
formatex(szTextcharsmax(szText), "\ySlap [\wChoose Player\y]")
    
menu_additem(AdminMenuszText"1"0)
    
    
formatex(szTextcharsmax(szText), "\ySlay [\wChoose Player\y]")
    
menu_additem(AdminMenuszText"2"0)
    
    
formatex(szTextcharsmax(szText), "\yRevive [\wChoose Player\y]")
    
menu_additem(AdminMenuszText"3"0)
    
    
formatex(szTextcharsmax(szText), "\yKick [\wChoose Player\y]")
    
menu_additem(AdminMenuszText"4"0)
    
    
formatex(szTextcharsmax(szText), "\yBan [\wChoose Player\y]")
    
menu_additem(AdminMenuszText"5"0)
    
    
formatex(szTextcharsmax(szText), "\yTransfer [\wChoose Player\y]")
    
menu_additem(AdminMenuszText"6"0)
    
    
    
menu_setprop(AdminMenuMPROP_EXITMEXIT_ALL)
    
menu_display(iPlayerAdminMenu0)
    
    return 
PLUGIN_HANDLED
}

public 
AdminMenuHandle(idmenuitem
{  
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], iName[64], accesscallback
    menu_item_getinfo
(menuitemaccessdatacharsmax(data), iNamecharsmax(iName), callback )
    new 
key str_to_num(data)
    
    switch(
key)
    { 
        case 
1SlapMenu(id)
        case 
2SlayMenu(id)
        
        case 
3ReviveMenu(id)
        case 
4KickMenu(id)
        case 
5BanMenu(id)
        case 
6TransferMenu(id)
    }
    return 
PLUGIN_HANDLED
}

//////////////////////////////////////////
//////// PLAYER MENU
//////////////////////////////////////////

public SlapMenu(id)
{
    new 
SlapPlayer menu_create ("\rSlap Menu^nChoose player:""HandleSlap")

    new 
numplayers[32], tempidszTempID [10], tempname [32]
    
get_players (playersnum"a")

    for (new 
0numi++)
    {
        
tempid players ]

        
get_user_name (tempidtempname31)
        
num_to_str (tempidszTempID9)
        
menu_additem (SlapPlayertempnameszTempID0)
    }

    
menu_display (idSlapPlayer)
    return 
PLUGIN_HANDLED
}

public 
SlayMenu(id)
{
    new 
SlayPlayer menu_create ("\rSlay Menu^nChoose player:""HandleSlay")

    new 
numplayers[32], tempidszTempID [10], tempname [32]
    
get_players (playersnum"a")

    for (new 
0numi++)
    {
        
tempid players ]

        
get_user_name (tempidtempname31)
        
num_to_str (tempidszTempID9)
        
menu_additem (SlayPlayertempnameszTempID0)
    }

    
menu_display (idSlayPlayer)
    return 
PLUGIN_HANDLED
}

public 
ReviveMenu(id)
{
    new 
RevivePlayer menu_create ("\rRevive Menu^nChoose player:""HandleRevive")

    new 
numplayers[32], tempidszTempID [10], tempname [32]
    
get_players (playersnum"b")

    for (new 
0numi++)
    {
        
tempid players ]

        
get_user_name (tempidtempname31)
        
num_to_str (tempidszTempID9)
        
menu_additem (RevivePlayertempnameszTempID0)
    }

    
menu_display (idRevivePlayer)
    return 
PLUGIN_HANDLED
}

public 
KickMenu(id)
{
    new 
KickPlayer menu_create ("\rKick Menu^nChoose player:""HandleKick")

    new 
numplayers[32], tempidszTempID [10], tempname [32]
    
get_players (playersnum"a")

    for (new 
0numi++)
    {
        
tempid players ]

        
get_user_name(tempidtempname31)
        
num_to_str(tempidszTempID9)
        
menu_additem(KickPlayertempnameszTempID0)
    }

    
menu_display (idKickPlayer)
    return 
PLUGIN_HANDLED
}

public 
BanMenu(id)
{
    new 
BanPlayer menu_create ("\rBan Menu^nChoose player:""HandleBan")

    new 
numplayers[32], tempidszTempID [10], tempname [32]
    
get_players (playersnum"a")

    for (new 
0numi++)
    {
        
tempid players ]

        
get_user_name(tempidtempname31)
        
num_to_str(tempidszTempID9)
        
menu_additem(BanPlayertempnameszTempID0)
    }

    
menu_display (idBanPlayer)
    return 
PLUGIN_HANDLED
}
public 
TransferMenu(id)
{
    new 
TransferPlayer menu_create ("\rTransfer Menu^nChoose player:""HandleTransfer")

    new 
numplayers[32], tempidszTempID [10], tempname [32]
    
get_players (playersnum"a")

    for (new 
0numi++)
    {
        
tempid players ]

        
get_user_name(tempidtempname31)
        
num_to_str(tempidszTempID9)
        
menu_additem(TransferPlayertempnameszTempID0)
    }

    
menu_display (idTransferPlayer)
    return 
PLUGIN_HANDLED
}


//////////////////////////////////////////
//////// HANDLES
//////////////////////////////////////////

public HandleSlap(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], name[64]
    new 
accesscallback
    
    menu_item_getinfo 
(menuitemaccessdata5name63callback)
    new 
tempid str_to_num (data)
    
    
get_user_name(idszName32)
    
get_user_name(tempidszPlayerName32)
    
    
ColorChat(0GREY"%s ^4%s^3 just slapped ^4%s^3!"prefixszNameszPlayerName)
    
user_slap(tempid0)
    
    
CmdAdminMenu(id)
    
    return 
PLUGIN_CONTINUE
}

public 
HandleSlay(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], name[64]
    new 
accesscallback
    
    menu_item_getinfo 
(menuitemaccessdata5name63callback)
    new 
tempid str_to_num (data)
    
    
get_user_name(idszName32)
    
get_user_name(tempidszPlayerName32)
    
    
ColorChat(0GREY"%s ^4%s^3 just slayed ^4%s^3!"prefixszNameszPlayerName)
    
user_silentkill(tempid)

    
CmdAdminMenu(id)
    
    return 
PLUGIN_CONTINUE
}

public 
HandleRevive(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], name[64]
    new 
accesscallback
    
    menu_item_getinfo 
(menuitemaccessdata5name63callback)
    new 
tempid str_to_num (data)
    
    
get_user_name(idszName32)
    
get_user_name(tempidszPlayerName32)
    
    
ColorChat(0GREY"%s ^4%s^3 just revived ^4%s^3!"prefixszNameszPlayerName)

    
ExecuteHamB(Ham_CS_RoundRespawntempid)

    
CmdAdminMenu(id)
    
    return 
PLUGIN_CONTINUE
}

public 
HandleKick(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], name[64]
    new 
accesscallbackUserID
    
    menu_item_getinfo 
(menuitemaccessdata5name63callback)
    new 
tempid str_to_num(data)
    
    
get_user_name(idszName32)
    
get_user_name(tempidszPlayerName32)
    
UserID get_user_userid(tempid)
    
    
ColorChat(0GREY"%s ^4%s^3 just kicked ^4%s^3!"prefixszNameszPlayerName)

    
server_cmd("kick #%d"UserID)

    
CmdAdminMenu(id)
    
    return 
PLUGIN_CONTINUE
}

public 
HandleBan(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], name[64]
    new 
accesscallbackUserID
    
    menu_item_getinfo 
(menuitemaccessdata5name63callback)
    new 
tempid str_to_num(data)
    
    
get_user_name(idszName32)
    
get_user_name(tempidszPlayerName32)
    
UserID get_user_userid(tempid)
    
    
ColorChat(0GREY"%s ^4%s^3 just banned ^4%s^3 [Length:^4 30^3 minutes]!"prefixszNameszPlayerName)

    
server_cmd("amx_ban ^"#%d^" ^"30^" ^"Banned by ADMIN %s^"", UserID, szName)

    
CmdAdminMenu(id)
    
    return 
PLUGIN_CONTINUE
}
public 
HandleTransfer(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[6], name[64]
    new 
accesscallback
    
    menu_item_getinfo 
(menuitemaccessdata5name63callback)
    new 
tempid str_to_num (data)
    
    
get_user_name(idszName32)
    
get_user_name(tempidszPlayerName32)
    
    
ColorChat(0GREY"%s ^4%s^3 just transfered ^4%s^3!"prefixszNameszPlayerName)
    if(
cs_get_user_team(id) == CS_TEAM_T)
    {
        
cs_set_user_team(idCS_TEAM_CT)
        
ExecuteHamB(Ham_CS_RoundRespawntempid)
    }
    if(!(
cs_get_user_team(id) == CS_TEAM_T))
    {
        
cs_set_user_team(idCS_TEAM_T)
        
ExecuteHamB(Ham_CS_RoundRespawntempid)
    }
    
CmdAdminMenu(id)
    
    return 
PLUGIN_CONTINUE

__________________

Last edited by Ex1ne; 01-17-2012 at 16:29.
Ex1ne is offline
zENK
Member
Join Date: Aug 2011
Old 01-17-2012 , 16:39   Re: [REQ] Admin Menu CS 1.6
Reply With Quote #3

I'm sorry but, i'm extremly n00bish at these codes and stuff. where should i put that? make it a sma file?
zENK is offline
Ex1ne
Senior Member
Join Date: Oct 2011
Location: Norway
Old 01-17-2012 , 16:41   Re: [REQ] Admin Menu CS 1.6
Reply With Quote #4

Here
__________________
Ex1ne is offline
zENK
Member
Join Date: Aug 2011
Old 01-17-2012 , 17:04   Re: [REQ] Admin Menu CS 1.6
Reply With Quote #5

Quote:
Originally Posted by Ex1ne View Post
/tmp/textWDtIGs.sma(4) : fatal error 100: cannot read from file: "colorchat"

Compilation aborted.
1 Error.
zENK is offline
Ex1ne
Senior Member
Join Date: Oct 2011
Location: Norway
Old 01-17-2012 , 17:17   Re: [REQ] Admin Menu CS 1.6
Reply With Quote #6

k, here's .sma.
Attached Files
File Type: sma Get Plugin or Get Source (Admin-Menu.sma - 5250 views - 9.5 KB)
__________________
Ex1ne is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 01-17-2012 , 17:21   Re: [REQ] Admin Menu CS 1.6
Reply With Quote #7

He still wont be able to compile it, he needs the colorchat.inc.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
zENK
Member
Join Date: Aug 2011
Old 01-17-2012 , 17:31   Re: [REQ] Admin Menu CS 1.6
Reply With Quote #8

Plugin failed to compile! Please try contacting the author.
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/home/groups/alliedmodders/forums/files/1/5/9/2/4/5/98321.attach(4) : fatal error 100: cannot read from file: "colorchat"

Compilation aborted.
1 Error.

:/
How can i fix it? ^_ ^
zENK is offline
Ex1ne
Senior Member
Join Date: Oct 2011
Location: Norway
Old 01-17-2012 , 17:38   Re: [REQ] Admin Menu CS 1.6
Reply With Quote #9

http://forums.alliedmods.net/showthread.php?t=130511
__________________
Ex1ne is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 01-17-2012 , 17:39   Re: [REQ] Admin Menu CS 1.6
Reply With Quote #10

You must compile the plugin locally, read this. You will need this colorchat.inc also.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Reply


Thread Tools
Display Modes

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 05:34.


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