AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   amxbans (https://forums.alliedmods.net/showthread.php?t=299083)

RAW_192 07-02-2017 10:43

amxbans
 
Is this the right way to ban using advance bans?

server_cmd("amx_banip %s %d ^"noob^"", name, get_pcvar_num(g_BanTime) )

OciXCrom 07-02-2017 13:14

Re: amxbans
 
Can't you try it?

RAW_192 07-02-2017 13:19

Re: amxbans
 
I tried but it didn't work

fysiks 07-02-2017 13:31

Re: amxbans
 
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.

OciXCrom 07-02-2017 14:20

Re: amxbans
 
Why would you even use a name. Simply use the player's id.

Rohanlogs 07-03-2017 00:06

Re: amxbans
 
Quote:

Originally Posted by RAW_192 (Post 2532990)
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


All times are GMT -4. The time now is 22:49.

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