Raised This Month: $ Target: $400
 0% 

How can i get steamid of this menu?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-25-2018 , 07:52   Re: How can i get steamid of this menu?
Reply With Quote #1

Quote:
Originally Posted by Number1 View Post
Thanks for really fast answer! I need like example:

Ban current player in server:

1) Player1
2) Player2
3) Player3

and etc.

If admin choose on Player1 he get another menu:

1) Ban for 10min
2) Ban for 20min
3) Ban for 30min

and if admin choose option 2, player get banned by admin comand in console: client_cmd amx_ban 10 PlayerID PlayerUsername Reason: 10Minutes
Well, this menu is nowhere close to what you're requesting. You have to re-do it from 0.
__________________
edon1337 is offline
Number1
Junior Member
Join Date: Jul 2018
Old 07-25-2018 , 08:02   Re: How can i get steamid of this menu?
Reply With Quote #2

Quote:
Originally Posted by edon1337 View Post
Well, this menu is nowhere close to what you're requesting. You have to re-do it from 0.
Maybe u dont understand me. I need just get STEAMID of selected player into next menu

UPDATED:

HTML Code:
#include <amxmodx>

public plugin_init()
{
register_clcmd("say !ban", "AwesomeMenu");
}

public AwesomeMenu( id )
{
new menu = menu_create( "Ban players", "SubMenu" )
new rgPlayers[32], szPlayerName[32], szPlayerId[3], iPlayersCount, pevPlayer;
get_players(rgPlayers, iPlayersCount, "ch");
for (new i = 0; i < iPlayersCount; i++)
{
pevPlayer = rgPlayers[i];
get_user_name(pevPlayer, szPlayerName, charsmax(szPlayerName));
num_to_str(pevPlayer, szPlayerId, charsmax(szPlayerId));
menu_additem(menu, szPlayerName, szPlayerId);
}
menu_display( id, menu, 0 );
}

public SubMenu( id )
{
//Note that we will be using a different menu handler
new menu = menu_create( "Player BANMENU", "submenu_handler" )
menu_addtext2( menu, "Selected Player: PLAYER NAME GOES HERE");
menu_addtext2( menu, "Selected Player STEAMID: PLAYER STEAMID GOES HERE");
menu_additem( menu, "Banned for cheating", "", 0 );
menu_additem( menu, "Banned for camping", "", 0 );
menu_display( id, menu, 0 );
}

public submenu_handler( id, menu, item )
{
switch( item )
{
case 2:
{
client_cmd( id, "say Selected reason: Banned for cheating. Player steamid: PLAYER STEAMID GOES HERE" );
}
case 3:
{
client_cmd( id, "say Selected reason: Banned for camping. Player steamid: PLAYER STEAMID GOES HERE" );
}
case MENU_EXIT:
{
//If they are still connected
if ( is_user_connected( id ) )
//Lets send them back to the top menu
AwesomeMenu( id );
}
}
menu_destroy( menu );
return PLUGIN_HANDLED;
}  

Last edited by Number1; 07-25-2018 at 08:05.
Number1 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 12:47.


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