Raised This Month: $ Target: $400
 0% 

Help adding menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dj_freeze
Veteran Member
Join Date: Dec 2009
Location: Looking for you!
Old 10-06-2011 , 11:31   Help adding menu
Reply With Quote #1

Can someone help me add a menu and some small stuff? http://forums.alliedmods.net/showthread.php?t=168950
__________________
dj_freeze is offline
Send a message via Skype™ to dj_freeze
bibu
Veteran Member
Join Date: Sep 2010
Old 10-06-2011 , 11:31   Re: Help adding menu
Reply With Quote #2

Sucker.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 10-06-2011 , 12:02   Re: Help adding menu
Reply With Quote #3

Why the hell did you post it in request and then come here and post a link to it?

You don't need help so don't post here and do definetly not post multiple threads for same reason.
Erox902 is offline
dj_freeze
Veteran Member
Join Date: Dec 2009
Location: Looking for you!
Old 10-06-2011 , 12:06   Re: Help adding menu
Reply With Quote #4

Quote:
Originally Posted by Erox902 View Post
Why the hell did you post it in request and then come here and post a link to it?

You don't need help so don't post here and do definetly not post multiple threads for same reason.
Why?? Can't you just help?
__________________
dj_freeze is offline
Send a message via Skype™ to dj_freeze
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 10-06-2011 , 12:07   Re: Help adding menu
Reply With Quote #5

Why can you not just follow the rules?
Erox902 is offline
dj_freeze
Veteran Member
Join Date: Dec 2009
Location: Looking for you!
Old 10-06-2011 , 12:11   Re: Help adding menu
Reply With Quote #6

Quote:
Originally Posted by Erox902 View Post
Why can you not just follow the rules?
I'm sorry.. Can you help me with the menu?
__________________
dj_freeze is offline
Send a message via Skype™ to dj_freeze
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 10-06-2011 , 12:24   Re: Help adding menu
Reply With Quote #7

You don't need any help. You want it done for you, so don't post in help section!

And no I have no idea what the menu even is about.
And since you can't just be patient and wait for an answer in the first place I have no intentions to check it out either.
Erox902 is offline
dj_freeze
Veteran Member
Join Date: Dec 2009
Location: Looking for you!
Old 10-07-2011 , 04:22   Re: Help adding menu
Reply With Quote #8

Can someone please help me? I've read tutorials on how to make a menu, but i can't figure out how to attach a menu and a plugin. When I activate the menu, it doesn't react when I choose a player.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "Ban with proof"
#define VERSION "1.0.4"
#define AUTHOR "[lego]F34R"

static const banurl[] = "frz_666"

new Bantype

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_concmd("amx_banshot","banwithproof",ADMIN_BAN,"<Ban username with screenshot 1=IP 2=Steamid 3=Amxbans 4=Not ban")
    
register_cvar("amx_banurl",banurl)
    
Bantype register_cvar("amx_banshot_type""2")
    
register_clcmd"my_player_menu","AwesomeMenu")    
}

 public 
AwesomeMenu(id)
 {
    
//Create a variable to hold the menu
    
new menu menu_create("\rLook at this Player Menu!:""menu_handler");

    
//We will need to create some variables so we can loop through all the players
    
new players[32], pnumtempid;

    
//Some variables to hold information about the players
    
new szName[32], szTempid[10];

    
//Fill players with available players
    
get_players(playerspnum);

    
//Start looping through all players
    
for( new ii<pnumi++ )
    {
        
//Save a tempid so we do not re-index
        
tempid players[i];

        
//Get the players name and id as strings
        
get_user_name(tempidszNamecharsmax(szName));
        
num_to_str(tempidszTempidcharsmax(szTempid));

        
//Add the item for this player
        
menu_additem(amx_banshotszNameszTempid0);

    }

    
//We now have all players in the menu, lets display the menu
    
menu_display(idamx_banshot0);
 }
 public 
menu_handler(idamx_banshotitem)
 {
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(amx_banshot);
        return 
PLUGIN_HANDLED;
    }

    new 
data[6], szName[64];
    new 
accesscallback;
    
menu_item_getinfo(amx_banshotitemaccessdata,charsmax(data), szName,charsmax(szName), callback);

    
//Get the id of the player that was selected
    
new tempid str_to_num(data);

    
//If the player is alive
    
if( is_user_alive(tempid) )
    {
        
//Set their health to 100
        
set_user_health(tempid100);
    }

    
menu_destroy(amx_banshot);
    return 
PLUGIN_HANDLED;
 }

public 
banwithproof(id,level,cid){
    if(!
cmd_access(id,level,cid,2))
        return 
PLUGIN_HANDLED;

    new 
authid[32], ipadd[32], name[32],CurrentTime[9], hostname[64] ,banurl[64]
    new 
arg[32], arg2[32], temp[2]
    
    
read_argv(1,arg,31)
    
read_argv(2,arg2,31)
    
    new 
target cmd_target(id,arg,1)
    
    if (!
target) return PLUGIN_HANDLED
    
    get_user_ip
(target,ipadd,31)
    
get_cvar_string("hostname",hostname,63
    
get_user_name(target,name,31)
    
get_user_authid(target,authid,31)
    
get_cvar_string("amx_banurl"banurl,63)
    
    
log_to_file("BannedwithSS.txt","    %s | IP: %s^n",name,ipadd)
    
    
client_print(target,print_chat"[Banned] %s",hostname)
    
client_print(target,print_chat"[Banned] %s @ IP - %s",name,ipadd
    
    
get_time("%m/%d/%Y - %H:%M:%S",CurrentTime,31)
    
    
client_print(target,print_chat"[Banned] %s",CurrentTime)
    
client_print(target,print_chat"[Banned] Skype: %s",banurl)
    
    
console_print(target,"[Banned] %s",hostname)
    
console_print(target,"[Banned] %s @ IP - %s",name,ipadd
    
console_print(target,"[Banned] %s",CurrentTime)
    
console_print(target,"[Banned] Skype: %s",banurl)
    
    
client_cmd(target,"wait;wait;snapshot;wait;wait;snapshot;wait;wait;snapshot;wait;wait;snapshot;wait;wait;snapshot")
    
    
temp[0] = target
    temp
[1] = str_to_num(arg2)
    
    
set_task(5.0,"persontoban"targettemp2)
    
    return 
PLUGIN_HANDLED
}

public 
persontoban(arg[]){
    new 
name2[32]
    
    new 
target arg[0]
    new 
bantime arg[1]
    
    
get_user_name(target,name2,31)
    
    switch (
get_pcvar_num(Bantype))
    {
        case 
1:
        {
            
server_cmd("amx_ban %s %d",name2,bantime)
        }
        case 
2:
        {
            
server_cmd("amx_banip %s %d",name2,bantime)
        }
        case 
3:
        {
            
server_cmd("amx_ban %d %s",bantime,name2)
        }
        case 
4:
        {
            
server_cmd("amx_say Skype: %s",banurl)
        }
    }
    
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ 
+ can someone help me add a ban reason for banning by IP if possible. Because when i ban by IP it says: banned by %hostname% and I need there to be my skype so banned player could contact me.
__________________

Last edited by dj_freeze; 10-07-2011 at 05:11.
dj_freeze is offline
Send a message via Skype™ to dj_freeze
dj_freeze
Veteran Member
Join Date: Dec 2009
Location: Looking for you!
Old 10-21-2011 , 15:32   Re: Help adding menu
Reply With Quote #9

up?
__________________
dj_freeze is offline
Send a message via Skype™ to dj_freeze
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 19:36.


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