AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Ban with server_cmd (https://forums.alliedmods.net/showthread.php?t=141394)

Schwabba 10-23-2010 15:33

Ban with server_cmd
 
PHP Code:

            new szSteamId[32]
            
get_user_authid(idszSteamIdcharsmax(szSteamId))
            
server_cmd("amx_ban 5 %s T-Leave"szSteamId

PHP Code:

amx_ban
Anwendung
:  amx_ban <time in mins> <steamID or nickname or #authid or IP> <reason 

Mhh?

Vechta 10-23-2010 15:53

Re: Ban with server_cmd
 
PHP Code:

%

->
PHP Code:

%


Sylwester 10-23-2010 16:23

Re: Ban with server_cmd
 
Quote:

Originally Posted by Vechta (Post 1332531)
PHP Code:

%

->
PHP Code:

%


Fail.

@Schwabba: try this:
PHP Code:

            new szSteamId[32]
            
get_user_authid(idszSteamIdcharsmax(szSteamId))
            
server_cmd("amx_ban 5 ^"%s^" ^"T-Leave^""szSteamId


fysiks 10-23-2010 18:37

Re: Ban with server_cmd
 
Quote:

Originally Posted by Vechta (Post 1332531)
PHP Code:

%

->
PHP Code:

%


A SteamID is clearly not an integer. It has letters in it.

Schwabba 10-24-2010 01:00

Re: Ban with server_cmd
 
PHP Code:

Bandetails     details    
    
Player     unknown_STEAM_0
:1:18733669
Bantype     SteamID
SteamID     STEAM_0
:1:18733669
Steam community profile     http
://steamcommunity.com/profiles/76561197997733067
IP address     unknown_STEAM_0:1:18733669
Invoked on     23
-10-2010 22:22
Banlength     5  minutes 
Expires on     23
-10-2010 22:27  (already expired)
Reason     T-Leave 
Banned by Admin     
-=[Pingstars]=- Deathrun ()
Banned on Server     -=[Pingstars]=- Deathrun (deathrun_coldzone)
Previous offences     0
Comments     No comments Add comment 

It works, but it does'nt detect the name :(


All times are GMT -4. The time now is 10:28.

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