Raised This Month: $51 Target: $400
 12% 

Ban from Menu not working


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Andriis
Member
Join Date: May 2019
Old 05-28-2019 , 09:27   Ban from Menu not working
Reply With Quote #1

I am trying to do a menu to ban players. I have fix bans for swearing, cheating and stuff
When I compiled it was fine.. no errors, loaded to the server and didn't worked.. and console said that no one is called like this.. I don't know whats wrong, can someone help me?
Thanks in advance

Code:
if ( item == MENU_EXIT ) {
		menu_destroy( menu );
		return PLUGIN_HANDLED;
	}
	new szData[6], szName[64];
	new _access, item_callback;menu_item_getinfo( menu, item, _access, szData,charsmax( szData ), szName,charsmax( szName ), item_callback );
	new name[18] 
	get_user_name(id, name, 32) 
	
	server_cmd("amx_ban ^"%d^" ^"15^" ^"Do not swear^"", name)
	
	menu_destroy( menu );
	return PLUGIN_HANDLED;
Andriis is offline
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 05-28-2019 , 09:39   Re: Ban from Menu not working
Reply With Quote #2

I personally prefer to do a test with Get Steamid so the ban will be more efficient for the function

%s

Last edited by Fuck For Fun; 05-28-2019 at 09:45.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Andriis
Member
Join Date: May 2019
Old 05-28-2019 , 09:42   Re: Ban from Menu not working
Reply With Quote #3

Solved.
Not %d but %s
Andriis 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 16:40.


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