Quote:
Originally Posted by RAW_192
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
__________________