Raised This Month: $ Target: $400
 0% 

unBan Menu Help!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Natsheh
Veteran Member
Join Date: Sep 2012
Old 06-20-2013 , 14:55   unBan Menu Help!
Reply With Quote #1

Some One Tells Me Whats Wrong Why its not worrking

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

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "unBanned Menu"
#define VERSION "1.0"
#define AUTHOR "Free~Man"

new Array:g_DataName
new g_DataNums
new g_menuPosition[33]

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /unban""unBanMenu")
    
    
g_DataName ArrayCreate(32);
    
register_menucmd(register_menuid("unBanMenuid"), 1203"unBanMenuHandle")
}
public 
unBanMenu(idpos)
{
    new 
fp fopen("listip.cfg""r");
    
    if (!
fp)
    {
        return 
0;
    }
        

    new 
text[256];
    new 
szData[32];
    
    while (!
feof(fp))
    {
        
fgets(fptextcharsmax(text));
        
        if (
text[0] == ';')
        {
            continue;
        }
        if (
parse(textszDatacharsmax(szData)) < 1)
        {
            continue;
        }
        
ArrayPushString(g_DataNameszData);
        
g_DataNums++;
    }
    
    if (
pos 0)
        return

    new 
menuBody[512]
    new 
start pos 8
    
new 0

    
if (start >= g_DataNums)
        
start pos g_menuPosition[id] = 0

    
new len format(menuBody511"unBan Menu^n^n")
    new 
end start 8
    
new keys MENU_KEY_0

    
if (end g_DataNums)
        
end g_DataNums
    
    
for (new startend; ++a)
    {
        
keys |= (1<<b)
        
ArrayGetString(g_DataNameaszDatacharsmax(szData));
        
len += format(menuBody[len], 511-len"%d. %s^n", ++bszData)
    }

    if (
end != g_DataNums)
    {
        
format(menuBody[len], 511-len"^n9. %L...^n0. %L"id"MORE"idpos "BACK" "EXIT")
        
keys |= MENU_KEY_9
    
}
    else
        
format(menuBody[len], 511-len"^n0. %L"idpos "BACK" "EXIT")

    new 
menuName[64]
    
format(menuName63"unBanMenuid")

    
show_menu(idkeysmenuBody, -1menuName)
}
public 
unBanMenuHandle(idmenukey)
{
    switch( 
key )
    {
        case 
8unBanMenu(id, ++g_menuPosition[id])
        case 
9unBanMenu(id, --g_menuPosition[id])
        default:
        {
            new 
g_DataNums;
            new 
menuBody[624], szData[32];
            
            new 
g_menuPosition[id] * key
            ArrayGetString
(g_DataNameaszDatacharsmax(szData));
            
            
g_DataNums++;
            
format(menuBodycharsmax(menuBody), "; %s"szData);
            
write_file("listip.cfg"menuBodyg_DataNums 1);
            
unBanMenu(idg_menuPosition[id])
        }
    }


Last edited by Natsheh; 06-20-2013 at 14:56. Reason: Fixing
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
T0FF
Member
Join Date: Oct 2014
Location: Asia
Old 08-30-2015 , 13:23   Re: unBan Menu Help!
Reply With Quote #2

Quote:
Originally Posted by Natsheh View Post
Some One Tells Me Whats Wrong Why its not worrking

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

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "unBanned Menu"
#define VERSION "1.0"
#define AUTHOR "Free~Man"

new Array:g_DataName
new g_DataNums
new g_menuPosition[33]

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say /unban""unBanMenu")
    
    
g_DataName ArrayCreate(32);
    
register_menucmd(register_menuid("unBanMenuid"), 1203"unBanMenuHandle")
}
public 
unBanMenu(idpos)
{
    new 
fp fopen("listip.cfg""r");
    
    if (!
fp)
    {
        return 
0;
    }
        

    new 
text[256];
    new 
szData[32];
    
    while (!
feof(fp))
    {
        
fgets(fptextcharsmax(text));
        
        if (
text[0] == ';')
        {
            continue;
        }
        if (
parse(textszDatacharsmax(szData)) < 1)
        {
            continue;
        }
        
ArrayPushString(g_DataNameszData);
        
g_DataNums++;
    }
    
    if (
pos 0)
        return

    new 
menuBody[512]
    new 
start pos 8
    
new 0

    
if (start >= g_DataNums)
        
start pos g_menuPosition[id] = 0

    
new len format(menuBody511"unBan Menu^n^n")
    new 
end start 8
    
new keys MENU_KEY_0

    
if (end g_DataNums)
        
end g_DataNums
    
    
for (new startend; ++a)
    {
        
keys |= (1<<b)
        
ArrayGetString(g_DataNameaszDatacharsmax(szData));
        
len += format(menuBody[len], 511-len"%d. %s^n", ++bszData)
    }

    if (
end != g_DataNums)
    {
        
format(menuBody[len], 511-len"^n9. %L...^n0. %L"id"MORE"idpos "BACK" "EXIT")
        
keys |= MENU_KEY_9
    
}
    else
        
format(menuBody[len], 511-len"^n0. %L"idpos "BACK" "EXIT")

    new 
menuName[64]
    
format(menuName63"unBanMenuid")

    
show_menu(idkeysmenuBody, -1menuName)
}
public 
unBanMenuHandle(idmenukey)
{
    switch( 
key )
    {
        case 
8unBanMenu(id, ++g_menuPosition[id])
        case 
9unBanMenu(id, --g_menuPosition[id])
        default:
        {
            new 
g_DataNums;
            new 
menuBody[624], szData[32];
            
            new 
g_menuPosition[id] * key
            ArrayGetString
(g_DataNameaszDatacharsmax(szData));
            
            
g_DataNums++;
            
format(menuBodycharsmax(menuBody), "; %s"szData);
            
write_file("listip.cfg"menuBodyg_DataNums 1);
            
unBanMenu(idg_menuPosition[id])
        }
    }

have you got its solution?
T0FF is offline
colossus
Member
Join Date: Sep 2013
Old 08-30-2015 , 13:46   Re: unBan Menu Help!
Reply With Quote #3

server_cmd("removeip ^"%s^";wait;writeip", szData)
colossus is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-30-2015 , 15:07   Re: unBan Menu Help!
Reply With Quote #4

Quote:
Originally Posted by colossus View Post
server_cmd("removeip ^"%s^";wait;writeip", szData)
really man after 2 years you open this thread?
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
colossus
Member
Join Date: Sep 2013
Old 08-30-2015 , 17:35   Re: unBan Menu Help!
Reply With Quote #5

I did not open the subject, was T0FF.

Stop crying
colossus is offline
SANTO37
Member
Join Date: Aug 2008
Old 09-26-2015 , 07:39   Re: unBan Menu Help!
Reply With Quote #6

Will Work ?
SANTO37 is offline
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 09-26-2015 , 08:16   Re: unBan Menu Help!
Reply With Quote #7

Trash

Quote:
Originally Posted by T0FF View Post
have you got its solution?
Do not bump old threads!
redivcram 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 17:33.


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