Help ban with server_cmd()
Guys please help, i've tried one milion combinations of codes to write a simple line .
I want to ban a player when he disconnect if he has a boolean true . Idk what is the problem, i was thinking that he disconnect too soon so the server can't get his authid to banhim , i've scrooled all fucking topics i founded and nothing , the same result . I added an debug message, wich is called properly . but the player doesn't get ban. My last attempt was to ban him with addip but nothing works . PHP Code:
Thank you . (the amxx version is higher than 1.8.2) To make it easy for you, everything works only this part: Code:
|
Re: Help ban with server_cmd()
Use amx_addban
|
Re: Help ban with server_cmd()
I am not sure if this will solve the issue, but maybe you can try calling server_exec() right after server_cmd("amx_ban etc..").
Are you using any ban system? Does it use a local file or SQL? Or just what comes with AMXX by default? |
Re: Help ban with server_cmd()
Quote:
|
Re: Help ban with server_cmd()
Quote:
|
Re: Help ban with server_cmd()
Quote:
server_cmd() doesn't guarantee that the command is executed immediately, server_exec() has to be called in order to immediately execute whatever is inside server_cmd(). If it's not used, then the player will be fully disconnected and it will be too late to get his info. PHP Code:
|
Re: Help ban with server_cmd()
Thank captain, the code server_exec() works perfectly, i had just to set BanHim on false after banning.him otherwise would ban.the player over 800 times until server crash, but i solved it,.thank you .
|
| All times are GMT -4. The time now is 21:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.