[CS:GO] Bans with a reason
Hello community.
I wonder if it is possible to make a plugin which bans a player for a determined ammount of time and a reason, this mean, each reason will have a determined ammount of time, this will be useful to have more "control" to your server since punishment will depend on the crime. Something like. Ban reason: "abusive" "time: xxx" "insulting admin" "time: xxx" I hope i explain myself well, thanks! |
Re: [CS:GO] Bans with a reason
remove access to banning from web panel and client commands for sourcebans banning, then use the menu options, which can have access set independently from the client commands, to define the reasons/lengths that are selectable.
|
Re: [CS:GO] Bans with a reason
I don't use Sourcebans!
|
Re: [CS:GO] Bans with a reason
Nows the time to start ;)
|
Re: [CS:GO] Bans with a reason
You probably can write a wrapper SM function that calls the BanClient() native:
https://sm.alliedmods.net/api/index....d=show&id=295& I set 15 minutes aside and threw this together. I have no idea if it works, or if it even compiles (don't have the SM compiler here) but hopefully someone else can finish this up for you: PHP Code:
|
Re: [CS:GO] Bans with a reason
hello, first of all thanks alot for your help! If i use compiler it gives me 2 errors
error 055: start of function body without function header error 035: argument type mismatch <argument 3> Hope someone could fix it! |
Re: [CS:GO] Bans with a reason
Quote:
|
Re: [CS:GO] Bans with a reason
Fixed the compilation errors. I forgot this (https://spider.limetech.org/) thing by Asher existed.
This was not tested on a server, so test it yourself using a dummy account or something. The problems were: - Forgot the = after Plugin:myinfo - Forgot to include the ban flag parameter in BanClient() - Added a IsClientInGame check PHP Code:
|
Re: [CS:GO] Bans with a reason
When i try to ban someone called "Yacante" it tells me "unknown command sm_advan"
I also tried with sm_rcon sm_rcon sm_advban "Yacante" "insulting admin" L 06/20/2015 - 14:12:01: [SM] Native "IsClientInGame" reported: Client index 0 is invalid L 06/20/2015 - 14:12:01: [SM] Displaying call stack trace for plugin "advban.smx": L 06/20/2015 - 14:12:01: [SM] [0] Line 31 What i'm doing wrong? also, if plugins works, could you please add a section in !admin menu? so we can easy select the target and the reason? Thansk alot and i'm sure this will be really really useful for many people, you should release this in the news plugin section! |
Re: [CS:GO] Bans with a reason
I haven't written the support for entering player user names (mainly because I have no idea how to and plus I have a ton of other things to finish up). Use the client ID instead of the username.
If you type "status" onto the console (client console or server console) it will list each player's name with an index number (usually a number within 1 to 100), along with their steam ID and everything else. Say the guy "Yacante" has the client ID #53. Then you enter 'sm_advban 53 "insulting admin"' and it should ban them for 60 minutes. Try that and see if it works. You should use the status command on the console to get the client ID anyway, since some players can come in with untypable names (with Russian or Chinese or non-UTF-8 characters). EDIT: I also have no experience on admin menu integration. If anyone else is willing to lend a few minutes of their time for admin menu integration then they can write that support here. Thanks! |
| All times are GMT -4. The time now is 05:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.