AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Admin Menu By Natsheh (https://forums.alliedmods.net/showthread.php?t=217695)

Natsheh 06-06-2013 08:43

Admin Menu By Natsheh
 
6 Attachment(s)
Admin Menu

By Natsheh

Menu Contain :.

>> Page One >>

1. Kick/Ban Menu
2. Slap/Slay Menu
3. NoClip/GodMode Menu
4. Health/Armor Menu
5. Bury/unBury Menu
6. Team Menu
7. Revive Menu

>> Page Two >>

1. Gag/unGag Menu
2. Unlimited-Clip
3. Invisible Menu
4. Drugs Menu
5. Speed Menu
6. Give/Take Weapons Menu
7. Fun Round Menu

>> Page Three >>

1. unBan Menu
2. Change Map
3. Vote Map

>> End >>

Update [4/11/2014]

Installation Guide :-
Code:

Admin-Menu.amxx ---> cstrike/addons/amxmodx/plugins/
Admin-Menu.sma ---> cstrike/addons/amxmodx/scripting/
ban_list.cfg ---> cstrike/

PS :
Download Admin-Menu.sma its better and compile it, you need ColorChat.inc file to compile!

WhyThis 06-06-2013 08:53

Re: Admin Menu :)
 
Wrong section ! post it here :) https://forums.alliedmods.net/forumdisplay.php?f=26
and also add more description :D

hornet 06-06-2013 09:15

Re: Admin Menu :)
 
All of these things already exist and are much more quality coded.

YamiKaitou 06-06-2013 14:27

Re: Admin Menu :)
 
Quote:

Originally Posted by WhyThis (Post 1965579)

That is where he posted it. How is it in the wrong section?

Smatify 06-06-2013 14:38

Re: Admin Menu :)
 
All users can use it?

TRUE RED 06-06-2013 14:40

Re: Admin Menu :)
 
Quote:

Originally Posted by Smatify
All users can use it?

what do you mean?

Smatify 06-06-2013 14:44

Re: Admin Menu :)
 
Quote:

Originally Posted by TRUE RED (Post 1965769)
what do you mean?

All players can open and use the menu :D

WhyThis 06-06-2013 14:57

Re: Admin Menu :)
 
Quote:

Originally Posted by YamiKaitou (Post 1965755)
That is where he posted it. How is it in the wrong section?

When i saw this plugin it was in Suggestion/Request plugins O.o
maybe someone changed it :)

YamiKaitou 06-06-2013 15:02

Re: Admin Menu :)
 
Quote:

Originally Posted by WhyThis (Post 1965779)
When i saw this plugin it was in Suggestion/Request plugins O.o
maybe someone changed it :)

Nobody moved the thread

WhyThis 06-06-2013 15:13

Re: Admin Menu :)
 
Quote:

Originally Posted by YamiKaitou (Post 1965781)
Nobody moved the thread

LoOoOoL i'm not crazy ! i see it in Suggestion/Request !!

TheDS1337 06-06-2013 16:22

Re: Admin Menu :)
 
1 - You are not crazy.
2 - He is not the real author.

Blizzard_87 06-06-2013 16:24

Re: Admin Menu :)
 
menu doesnt even show up...
Code:
public AdminMenu(id) {     new AMenu = menu_create("Admin Menu^n\yChoose Option", "AdminMenuHandle")         new szAdminOptionNum[8]         for( new i = 0; i < sizeof szAdminOption; i ++ )     {         num_to_str(i, szAdminOptionNum, 7)         menu_additem(AMenu, szAdminOption[i], szAdminOptionNum, 0)     }     menu_display(id, AMenu)     return PLUGIN_CONTINUE } public AdminMenuHandle(id, menu, item) {     if(item == MENU_EXIT)     {         menu_destroy(menu)         return PLUGIN_HANDLED     }         new data[9], name[64]     new access, callback     menu_item_getinfo(menu, item, access, data, 8, name, 63, callback)

you make new AMenu in the first function then change it to menu in the handler... thus menu will never load.

Natsheh 06-06-2013 16:26

Re: Admin Menu :)
 
oh sorry lol i wiill fix it

YamiKaitou 06-06-2013 16:36

Re: Admin Menu :)
 
Quote:

Originally Posted by Blizzard_87 (Post 1965841)
menu doesnt even show up...
you make new AMenu in the first function then change it to menu in the handler... thus menu will never load.

Your reasoning makes no sense, did you even try the plugin? AMenu is a local variable to function AdminMenu and menu is a local variable to AdminMenuHandle. The 2 variables being different names means nothing since they can't see each other anyways.

Blizzard_87 06-06-2013 16:44

Re: Admin Menu :)
 
Quote:

Originally Posted by YamiKaitou (Post 1965851)
Your reasoning makes no sense, did you even try the plugin? AMenu is a local variable to function AdminMenu and menu is a local variable to AdminMenuHandle. The 2 variables being different names means nothing since they can't see each other anyways.

yes i did try the plugin and the menu wasnt loading then after i changed it all to menu variable it menu started working... i understand what your saying and i do not know what was wrong but after i changed it started working.

YamiKaitou 06-06-2013 16:54

Re: Admin Menu :)
 
Quote:

Originally Posted by Blizzard_87 (Post 1965854)
yes i did try the plugin and the menu wasnt loading then after i changed it all to menu variable it menu started working... i understand what your saying and i do not know what was wrong but after i changed it started working.

I just tested the old version as well, the menu showed just fine for me. I even tested it by kicking myself using the menu. There was nothing wrong with the previous version (in terms of the menu not displaying)

Blizzard_87 06-06-2013 17:30

Re: Admin Menu :)
 
Quote:

Originally Posted by YamiKaitou (Post 1965861)
I just tested the old version as well, the menu showed just fine for me. I even tested it by kicking myself using the menu. There was nothing wrong with the previous version (in terms of the menu not displaying)

ok must of been something else wrong with my LAN server... my bad sorry.

EDIT: i would suggest the author to change the banning to SteamID instead of IP tho...

Cheezpuff 06-06-2013 17:51

Re: Admin Menu :)
 
Any Picture?
Before i Test it.

Natsheh 06-07-2013 07:59

Quote:

Originally Posted by DeagLe.Studio (Post 1965838)
1 - You are not crazy.
2 - He is not the real author.

1- Yes Im Not
2- and im the real author icalled my self The Free~Man

Quote:

Originally Posted by Cheezpuff (Post 1965887)
Any Picture?
Before i Test it.

No Pic :) See It And Test it Did you like it?

sami_spt 06-07-2013 12:25

Re: Admin Menu :)
 
How about fixing the errors*(bugs) that was reported in the previous posts?

You must prove that you can support the plugin so that a moderator will not trash your plugin or Unapprove it.

OTTOMANSAYKO 07-14-2013 22:29

Re: Admin Menu :)
 
This is just like amxsuper menu,, but it is a poor version :D

no need...

Jhob94 07-15-2013 06:43

Re: Admin Menu :)
 
And read the rules, you arent authorized to upload plugins related to drugs

Arkshine 07-15-2013 15:14

Re: Admin Menu :)
 
Redundant, unapproved.

Natsheh 09-02-2013 14:22

Re: Admin Menu :)
 
Quote:

Originally Posted by Jhob94 (Post 1991168)
And read the rules, you arent authorized to upload plugins related to drugs

im the real author i call my self FREE~MAN -.-

Natsheh 10-04-2013 06:19

Re: Admin Menu :)
 
Quote:

Originally Posted by Blizzard_87 (Post 1965880)
ok must of been something else wrong with my LAN server... my bad sorry.

EDIT: i would suggest the author to change the banning to SteamID instead of IP tho...


Okay! [ Done ]

Jhob94 10-04-2013 08:23

Re: Admin Menu :)
 
Quote:

Originally Posted by Natsheh (Post 2027149)
im the real author i call my self FREE~MAN -.-

I said you arent allowed to post plugins related to drugs. I didnt said you arent the author.
Anyway, ask some admin to trash this thread
And why did you started another thread? ...

Natsheh 10-04-2013 09:29

Re: Admin Menu :)
 
Quote:

Originally Posted by Jhob94 (Post 2044962)
I said you arent allowed to post plugins related to drugs. I didnt said you arent the author.
Anyway, ask some admin to trash this thread
And why did you started another thread? ...


To Try Approved ?

Snitch 10-04-2013 19:45

Re: Admin Menu :)
 
Nice AdminMenu make it !amxx Open the menu for admin

and please can you add every menu Access

Kick/Ban Menu?

ADMIN_KICK

you can edit for every menu put a access

Natsheh 10-05-2013 08:40

Re: Admin Menu :)
 
Quote:

Originally Posted by Snitch (Post 2045201)
Nice AdminMenu make it !amxx Open the menu for admin

and please can you add every menu Access

Kick/Ban Menu?

ADMIN_KICK

you can edit for every menu put a access

Thx I Will

Natsheh 10-06-2013 07:46

Re: Admin Menu :)
 
Quote:

Originally Posted by Arkshine (Post 1991555)
Redundant, unapproved.



if i remove the drugs ?? what will y do?

Snitch 10-06-2013 17:15

Re: Admin Menu :)
 
you have a stupid things in Menu -.-

when you upgread edit in thread. i will think about idea soon

Jhob94 10-06-2013 18:51

Re: Admin Menu :)
 
Quote:

Originally Posted by Natsheh (Post 2045752)
if i remove the drugs ?? what will y do?

Problem isnt drugs at all. Your code is poor and what your menu has, others plugins already have (and better coded)
If you want this plugin to stop being unapproved, optimize the code and change totaly the menu items.

Natsheh 10-07-2013 11:56

Re: Admin Menu :)
 
Quote:

Originally Posted by Jhob94 (Post 2046014)
Problem isnt drugs at all. Your code is poor and what your menu has, others plugins already have (and better coded)
If you want this plugin to stop being unapproved, optimize the code and change totaly the menu items.

So.... Should i Change the menu to variable menu???

AND POWER UP THE CODES???

Natsheh 10-07-2013 11:57

Re: Admin Menu :)
 
Quote:

Originally Posted by Snitch (Post 2045985)
you have a stupid things in Menu -.-

when you upgread edit in thread. i will think about idea soon

like whaT?

Jhob94 10-07-2013 12:55

Re: Admin Menu :)
 
Quote:

Originally Posted by Natsheh (Post 2046274)
So.... Should i Change the menu to variable menu???

AND POWER UP THE CODES???

I think you should optimize the code and make unique stuff. The problem here is that what your plugin has, anothers plugins has it too.

Natsheh 10-07-2013 16:56

Re: Admin Menu :)
 
Quote:

Originally Posted by jhob94 (Post 2046301)
i think you should optimize the code and make unique stuff. The problem here is that what your plugin has, anothers plugins has it too.

i will look of amx super and take some ideas

Jhob94 10-07-2013 16:59

Re: Admin Menu :)
 
Quote:

Originally Posted by Natsheh (Post 2046404)
i will look of amx super and take some ideas

lol your ideas need to be unique, not copying items from anothers plugins...

Natsheh 10-08-2013 04:37

Re: Admin Menu :)
 
Quote:

Originally Posted by Jhob94 (Post 2046408)
lol your ideas need to be unique, not copying items from anothers plugins...

okay

LearninG 05-01-2019 22:45

Re: Admin Menu By Natsheh
 
1 Attachment(s)
First of all sry for opening old thread but i need this.

@Natsheh i have problem with Ban/Kick Menu , i used to copy and paste the codes for Ban/Kick in new sma file and made a new plugin to add it in amxmodmenu and everything was good.

But it has only 1 problem, the ban option don't Ban the player, the information of steam id , length , nick of player goes in ban_list.cfg but the banned player can join the server with same steam id and nick!!

Codes of single Ban/Kick Menu Plugin :
PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <fakemeta>
#include <engine>
#include <hamsandwich>
#include <colorchat>

#define PLUGIN "Admin~Menu"
#define VERSION "1.7"
#define AUTHOR "Natsheh"

#define IMMUNITY ADMIN_IMMUNITY

#define ACCESS ADMIN_LEVEL_A

#define MAX_LEN 64

new szBanList[] = "ban_list.cfg"

new const szAdminOption[][] = {
    
"Kick/Ban Menu"


new 
szKB[33]


new const 
szKBText[][] = {
    
"Kick",
    
"Ban"
}


new 
szReasons[33][32]

new 
szLengths[33][11]

new 
KBTiming[33]




public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_concmd("amx_bankick""AdminMenu", -1"Open admin menu"ACCESS)
    
    
register_clcmd("Reason""KBReason", -1"Reason to kick/ban"ACCESS)
    
register_clcmd("Length""KBLength", -1"Length to ban"ACCESS)
}

public 
AdminMenu(id)
{
    if(!(
get_user_flags(id) & ACCESS))
    {
        
ColorChat(idNORMAL"^4You ^1Are ^3Not ^4Admin^3!")
        return 
PLUGIN_HANDLED
    
}
    
    new 
AMenu menu_create("Admin Menu^n\yChoose Option""AdminMenuHandle")
    
    new 
szAdminOptionNum[8]
    
    for( new 
0sizeof szAdminOption++ )
    {
        
num_to_str(iszAdminOptionNum7)
        
menu_additem(AMenuszAdminOption[i], szAdminOptionNum0)
    }
    
menu_display(idAMenu)
    return 
PLUGIN_CONTINUE
}
public 
AdminMenuHandle(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
data[9], name[64]
    new 
accesscallback
    menu_item_getinfo
(menuitemaccessdata8name63callback)
    
    new 
tempOption str_to_num(data)
    
    switch( 
tempOption )
    {
        case 
0KBMenu(id)
    }
    return 
PLUGIN_HANDLED
}

public 
KBMenu(id)
{
    new 
szText[64]
    
    
formatex(szTextcharsmax(szText), "Kick/Ban Menu")
    new 
KB menu_create(szText"KBMenuHandle")
    
    new 
players[32], numname[32], szTempid[32]
    
    if(
equal(szReasons[id], ""))
        
format(szReasons[id], 31"None")
    if(
equal(szLengths[id], ""))
        
format(szLengths[id], 10"0")
    
    
formatex(szTextcharsmax(szText), "\w%s \rPlayer"szKBText[szKB[id]])
    
menu_additem(KBszText"1"0)
    
    
formatex(szTextcharsmax(szText), "\rReason: \w%s"szReasons[id])
    
menu_additem(KBszText"2"0)
    
    if(
szKB[id] == 0)
        
formatex(szTextcharsmax(szText), "\dLength: %s %s"szLengths[id], equal(szLengths[id], "0") ? "Permanent":"Minute")
    if(
szKB[id] == 1)
        
formatex(szTextcharsmax(szText), "\rLength: \w%s %s"szLengths[id], equal(szLengths[id], "0") ? "Permanent":"Minute")
    
    
menu_additem(KBszText"3"0)
    
    
get_players(playersnum)
    
    for( new 
0numi++ )
    {
        new 
tempid players]
        
        
get_user_name(tempidnamecharsmax(name))
        
num_to_str(tempidszTempid31)
        
        if(
tempid == id || access(tempidIMMUNITY) || is_user_bot(tempid))
            
formatex(szTextcharsmax(szText), "\d%s \r%s"name, (is_user_bot(tempid) ? "Bot":"*"))
        else
            
formatex(szTextcharsmax(szText), "%s"name)
        
menu_additem(KBszTextszTempid0)
    }
    
menu_display(idKB)
    return 
PLUGIN_CONTINUE
}
public 
KBMenuHandle(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    new 
data[5], name[64]
    new 
Accesscallback
    menu_item_getinfo
(menuitemAccessdata4name63callback)
    
    new 
tempid str_to_num(data)
    
    new 
szAdminName[32], szPlayerName[32], IPa[32], szAuthid[32]
    
get_user_name(idszAdminNamecharsmax(szAdminName))
    
get_user_name(tempidszPlayerNamecharsmax(szPlayerName))
    
get_user_ip(tempidIPacharsmax(IPa), 1)
    
get_user_authid(tempidszAuthidcharsmax(szAuthid))
    
    switch( 
item )
    {
        case 
0:
        {
            if(
szKB[id] == 0)
            {
                
szKB[id] = 1
                KBMenu
(id)
                return 
PLUGIN_HANDLED
            
}
            if(
szKB[id] == 1)
            {
                
szKB[id] = 0
                KBMenu
(id)
                return 
PLUGIN_HANDLED
            
}
        }
        case 
1:
        {
            
client_cmd(id"messagemode Reason")
            return 
PLUGIN_HANDLED
        
}
        case 
2:
        {
            if(
szKB[id] == 0)
            {
                
KBMenu(id)
                return 
PLUGIN_HANDLED
            
}
            if(
szKB[id] == 1)
            {
                
client_cmd(id"messagemode Length")
                return 
PLUGIN_HANDLED
            
}
        }
        default:
        {
            if(
tempid == id || access(tempidIMMUNITY) || is_user_bot(tempid))
            {
                
KBMenu(id)
                return 
PLUGIN_CONTINUE
            
}
            
            new 
KBMotd[2214], title[64], pos 0
            
            
if(szKB[id] == 0)
                
format(titlecharsmax(title), "You Have Been Kicked")
            if(
szKB[id] == 1)
                
format(titlecharsmax(title), "You Have Been Banned")
            
            
pos += format(KBMotd[pos],2213-pos"<html><head><style type=^"text/css^">pre{color:#FF0505;}body{background:#000000;margin-left:16px;margin-top:1px;}</style></head><pre><body>")
            
            if(
szKB[id] == 0)
                
pos += format(KBMotd[pos],2213-pos"<h1><center>You Have Been Kicked</center></h1>")
            if(
szKB[id] == 1)
                
pos += format(KBMotd[pos],2213-pos"<h1><center>You Have Been Banned</center></h1>")
            
            
pos += format(KBMotd[pos],2213-pos"<h2><center>Reason: %s</center></h2>"szReasons[id])
            
            if(
szKB[id] == 1)
                
pos += format(KBMotd[pos],2213-pos"<h2><center>Length: %s %s</center></h2>"szLengths[id], equal(szLengths[id], "0") ? "Permanent":"Minute")
            
            if(
szKB[id] == 0)
                
pos += format(KBMotd[pos],2213-pos"<h3><center>Kicked~By~Admin: %s</center></h3>"szAdminName)
            if(
szKB[id] == 1)
                
pos += format(KBMotd[pos],2213-pos"<h3><center>Banned~By~Admin: %s</center></h3>"szAdminName)
            
            if(
equal(szAuthid"STEAM_ID_LAN"))
                
pos += format(KBMotd[pos],2213-pos"<h1><center>IP: %s</center></h1>"IPa)
            else
                
pos += format(KBMotd[pos],2213-pos"<h1><center>Steam_ID: %s</center></h1>"szAuthid)
            
            
szKB[tempid] = szKB[id]
            
szLengths[tempid] = szLengths[id]
            
KBTiming[tempid] = 5
            
            
if(szKB[id] == 0)
            {
                
ColorChat(0NORMAL"^4Admin ^1%s^3: ^1Has ^3Kicked ^4%s^3|^1Reason: ^4%s^3!"szAdminNameszPlayerNameszReasons[id])
                
log_amx("%s Has Kicked %s Reason %s"szAdminNameszPlayerNameszReasons[id])
            }
            if(
szKB[id] == 1)
            {
                
ColorChat(0NORMAL"^4Admin ^1%s^3: ^1Has ^3Banned ^4%s^3|^1Reason: ^4%s^3|^1Length: ^4%s %s^3!"szAdminNameszPlayerNameszReasons[id], szLengths[id], equal(szLengths[id], "0") ? "Permanent":"Minute")
                
log_amx("%s Has Banned %s Reason %s Length %s %s"szAdminNameszPlayerNameszReasons[id], szLengths[id], equal(szLengths[id], "0") ? "Permanent":"Minute")
            }
            
show_motd(tempidKBMotdtitle)
            
set_task(1.0"KBTime"tempid__"b")
        }
    }
    return 
PLUGIN_HANDLED
}
public 
KBTime(id)
{
    static 
name[32], IPa[32], authid[32], szLogBan[MAX_LEN]
    
get_user_name(idnamecharsmax(name))
    
get_user_ip(idIPacharsmax(IPa), 1)
    
get_user_authid(idauthidcharsmax(authid))
    
    if(
KBTiming[id] > 0)
    {
        
set_hudmessage(42170255, -1.0, -1.006.01.00.50.52)
        
show_hudmessage(id"Leaving in %i Seconds"KBTiming[id])
        
        new 
szWord[32]
        
num_to_word(KBTiming[id], szWord31)
        
client_cmd(id"spk %s"szWord)
        
        
KBTiming[id] --
        return 
PLUGIN_CONTINUE
    
}
    
    
remove_task(id)
    
    if(
szKB[id] == 0)
    {
        
server_cmd("kick ^"%s^""name)
        return 
PLUGIN_HANDLED
    
}
    if(
szKB[id] == 1)
    {
        if (
equal("4294967295"authid)
            || 
equal("HLTV"authid)
            || 
equal("STEAM_ID_LAN"authid)
            || 
equali("VALVE_ID_LAN"authid))
        {
            
format(szLogBanMAX_LEN"^n^"IP^" ^"%s^" ^"%s^" ^"%s^""szLengths[id], IPaname)
            
write_file(szBanListszLogBan, -1)
            
server_cmd("addip %s ^"%s^""szLengths[id], IPa)
            return 
PLUGIN_HANDLED
        
}
        else
        {
            
format(szLogBanMAX_LEN"^n^"ID^" ^"%s^" ^"%s^" ^"%s^""szLengths[id], authidname)
            
write_file(szBanListszLogBan, -1)
            
server_cmd("banid %s ^"%s^""szLengths[id], authid)
            return 
PLUGIN_HANDLED
        
}            
    }
    return 
PLUGIN_HANDLED
}
public 
KBReason(id)
{
    new 
Reason[53]
    
read_args(Reason52)
    
    
remove_quotes(Reason)
    
    new 
len strlen(Reason)
    
    for( new 
0leni++ )
    {
        if(!
isalpha(Reason[i]) && !isspace(Reason[i]) && Reason[i] != '+')
        {
            
client_print(idprint_center"Only Alphabet")
            
KBMenu(id)
            return
        }
    }
    
    if(
equal(Reason""))
        
format(szReasons[id], 52"None")
    else
        
format(szReasons[id], 52"%s"Reason)
    
    
KBMenu(id)
}
public 
KBLength(id)
{
    new 
Length[11]
    
read_args(Length10)
    
    
remove_quotes(Length)
    
    new 
len strlen(Length)
    
    for( new 
0leni++ )
    {
        if(!
isdigit(Length[i]))
        {
            
client_print(idprint_center"Only Numbers")
            
KBMenu(id)
            return
        }
    }
    
    if(
equal(Length"") || equal(Length"00"1))
        
format(szLengths[id], 10"0")
    else
        
format(szLengths[id], 10"%s"Length)
    
    
KBMenu(id)


I will upload ScreenShots so you can see what i made : https://anonfile.com/xbU5Kdl3n6/Ban_...creenshots_rar

and the sma file also :


All times are GMT -4. The time now is 22:30.

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