Raised This Month: $ Target: $400
 0% 

amxbans


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RAW_192
Senior Member
Join Date: Feb 2017
Old 07-02-2017 , 10:43   amxbans
Reply With Quote #1

Is this the right way to ban using advance bans?

server_cmd("amx_banip %s %d ^"noob^"", name, get_pcvar_num(g_BanTime) )
RAW_192 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-02-2017 , 13:14   Re: amxbans
Reply With Quote #2

Can't you try it?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
RAW_192
Senior Member
Join Date: Feb 2017
Old 07-02-2017 , 13:19   Re: amxbans
Reply With Quote #3

I tried but it didn't work
RAW_192 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-02-2017 , 13:31   Re: amxbans
Reply With Quote #4

Test the command in console and then simply replicate that in your code. Also, names might contain spaces so you would need to use quotes around the name.
__________________

Last edited by fysiks; 07-02-2017 at 13:32.
fysiks is online now
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-02-2017 , 14:20   Re: amxbans
Reply With Quote #5

Why would you even use a name. Simply use the player's id.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Rohanlogs
Senior Member
Join Date: Nov 2015
Old 07-03-2017 , 00:06   Re: amxbans
Reply With Quote #6

Quote:
Originally Posted by RAW_192 View Post
Is this the right way to ban using advance bans?
Hi.
If you're using AdvancedBans by Exolent, this should be compatible with it
Code:
    new szReason[ ] = "noob"     new szIP[ 32 ], szName[ 32 ] szAuth[ 32 ]     get_user_ip( index, szIP, charsmax( szIP ), 1 )     get_user_name( index, szName, charsmax( szName ) )     get_user_authid( index, szAuth, charsmax( szAuth ) )         //target is connected     server_cmd( "amx_ban ^"%s^" 0 ^"%s^"", szAuth, szReason )         //target not in server     //server_cmd( "amx_addban ^"%s^" ^"%s^" 0 ^"%s^"", szName, szIP, szReason )     //server_cmd( "amx_addban ^"%s^" ^"%s^" 0 ^"%s^"", szName, szAuth, szReason )
If its something else you should be able to make it by looking at this
__________________

Last edited by Rohanlogs; 07-03-2017 at 00:23.
Rohanlogs is offline
Reply


Thread Tools
Display Modes

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 22:49.


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