Raised This Month: $12 Target: $400
 3% 

[CS:S/CS:GO] CT Bans


Post New Thread Reply   
 
Thread Tools Display Modes
plock
Senior Member
Join Date: Feb 2016
Location: noitacoL
Old 02-13-2019 , 14:26   Re: [CS:S/CS:GO] CT Bans
Reply With Quote #441

Quote:
Originally Posted by NanoC View Post
This plugin is glitch as fuck, we aren't able to ctban anyone because if we do it (for x time), the person who have been banned, will have a permaban. This didn't happened before, i don't know why is happening right now

*Edit: If the map isn't changed or the person doesn't leave the server, they won't be banned permanently, but if the map changes or the player leaves the server and connect again, it says that he is banned permanently
For some reason it's loading the timeleft with 0 when you rejoin the server, so you can add the following lines to force to load the timeleft from the database.

Add to the variable CTBAN_QUERY_LOG_ISBANNED the timeleft information on the SLECT string.
"SELECT timestamp, admin_name, reason, timeleft FROM %s WHERE perp_steamid = '%s' AND timeleft >= 0 ORDER BY timestamp DESC LIMIT 1"

Add this after line 224:
Code:
#define ISBANNED_CB_FIELD_TIMELEFT 3
And this after line 3489
Code:
if (gA_LocalTimeRemaining[iTarget] == 0) {
	gA_LocalTimeRemaining[iTarget] = SQL_FetchInt(hCallback, ISBANNED_CB_FIELD_TIMELEFT);
}
__________________
~tuturu

Owner/Developer at Kniv
My Steam Profile

Last edited by plock; 02-13-2019 at 15:00.
plock is offline
NanoC
Veteran Member
Join Date: Jan 2016
Location: Argentina
Old 02-13-2019 , 15:14   Re: [CS:S/CS:GO] CT Bans
Reply With Quote #442

You forgot to mention that we must write
Code:
#define ISBANNED_CB_FIELD_TIMELEFT 3
in ctban.inc too, don't forget that!
Btw, thank you for the help, the problem is solved

Attached files:
Attached Files
File Type: inc ctban.inc (15.6 KB, 102 views)
File Type: smx sm_ctban.smx (41.3 KB, 97 views)
File Type: sp Get Plugin or Get Source (sm_ctban.sp - 297 views - 117.4 KB)
__________________

Last edited by NanoC; 02-13-2019 at 15:15.
NanoC is offline
Send a message via Skype™ to NanoC
NanoC
Veteran Member
Join Date: Jan 2016
Location: Argentina
Old 02-13-2019 , 15:20   Re: [CS:S/CS:GO] CT Bans
Reply With Quote #443

Also i've edited just a bit the code. I don't want that people must be ALIVE to be the ban reduced. If you don't want that just download this code:
Attached Files
File Type: inc ctban.inc (15.6 KB, 119 views)
File Type: smx sm_ctban.smx (41.2 KB, 102 views)
File Type: sp Get Plugin or Get Source (sm_ctban.sp - 342 views - 117.3 KB)
__________________
NanoC is offline
Send a message via Skype™ to NanoC
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 02-13-2019 , 17:23   Re: [CS:S/CS:GO] CT Bans
Reply With Quote #444

Quote:
Originally Posted by plock View Post
For some reason it's loading the timeleft with 0 when you rejoin the server, so you can add the following lines to force to load the timeleft from the database.

Add to the variable CTBAN_QUERY_LOG_ISBANNED the timeleft information on the SLECT string.
"SELECT timestamp, admin_name, reason, timeleft FROM %s WHERE perp_steamid = '%s' AND timeleft >= 0 ORDER BY timestamp DESC LIMIT 1"

Add this after line 224:
Code:
#define ISBANNED_CB_FIELD_TIMELEFT 3
And this after line 3489
Code:
if (gA_LocalTimeRemaining[iTarget] == 0) {
	gA_LocalTimeRemaining[iTarget] = SQL_FetchInt(hCallback, ISBANNED_CB_FIELD_TIMELEFT);
}
Thx

Quote:
Originally Posted by NanoC View Post
You forgot to mention that we must write
Code:
#define ISBANNED_CB_FIELD_TIMELEFT 3
in ctban.inc too, don't forget that!
Btw, thank you for the help, the problem is solved

Attached files:
Thx

In any case I'm talking to a developer, making a budget with him to update this plugin and make some improvements, I'll be finalizing with him to see how much he charges and if everything works out right here also for everyone.
paulo_crash is offline
NanoC
Veteran Member
Join Date: Jan 2016
Location: Argentina
Old 02-13-2019 , 17:29   Re: [CS:S/CS:GO] CT Bans
Reply With Quote #445

Thanks, i've realized that the changes made by Ploc didnt work either, so don't download or edit anything.
__________________
NanoC is offline
Send a message via Skype™ to NanoC
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 02-13-2019 , 17:30   Re: [CS:S/CS:GO] CT Bans
Reply With Quote #446

Quote:
Originally Posted by NanoC View Post
Thanks, i've realized that the changes made by Ploc didnt work either, so don't download or edit anything.
I understand, thank you anyway...
paulo_crash is offline
plock
Senior Member
Join Date: Feb 2016
Location: noitacoL
Old 02-14-2019 , 07:46   Re: [CS:S/CS:GO] CT Bans
Reply With Quote #447

My changes were only updating the info for !isbanned :/. But we realized the plugin has to be reworked also, since the information is not loading properly sometimes or timeleft not being updated properly too.
__________________
~tuturu

Owner/Developer at Kniv
My Steam Profile
plock is offline
NanoC
Veteran Member
Join Date: Jan 2016
Location: Argentina
Old 03-08-2019 , 14:59   Re: [CS:S/CS:GO] CT Bans
Reply With Quote #448

any idea how to fix that error? its important
__________________
NanoC is offline
Send a message via Skype™ to NanoC
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 03-20-2019 , 08:03   Re: [CS:S/CS:GO] CT Bans
Reply With Quote #449

So, come on...

The guy who makes private plugins for me came back from his vacation, I'll be seeing with him how much he would charge to make some changes and correct Ban's BUG.

So far I have this to fix the Plugin and updates I want in it.

Fix BUG
  • Fix a BUG that when we apply a Temporary CTBan if the server change map, shut down or restart for any reason before banning the player to zero the ban is permanent;

Update
  • Add the option to make a vote to ban a CT player when there are no players with privileges on the server;
This voting would only work if you had no player with privileges on the server to ban CTBan, if you have any player with privileges to apply CTBan he does not vote, you would give an error message that it is only possible to have a CTBan vote if you have not players with privileges on the server.
The voting command would be something like sm_votectban, there it would show the list of CTs it has on the server at the moment and only the TRs can vote. (Only CTBan applies if most TRS vote yes)
This Vote CTBan would default to a 15 Minutes ban and the reason for the ban by default would be Vote CTBan.
  • Add option to ban permanent by a separate flag;
Currently who has access to CTBan can ban even permanent, in case it would be good to separate a flag to ban permanent part and if the player does not have it only have access to temporary bans.
This would also apply to the Rage Ban option, in case the player who has access to the Rage Ban can ban permanent, he will only have access to Rage Ban if he has a flag set up.
  • Change in the way of counting the remaining time of the players ban;
The plugin only starts counting the time if the player is inside the server and playing, that is, if it enters the server and goes to spec, the time of the ban does not reduce, according to the author of the plugin.
It would be nice for the plugin to save the time played every X time let's say, so if for some reason the server reboot or shut down when it's back time has not reset, continue from where it stopped.
And it would still leave that to count the time the player has to be playing, it has to be in the TR team as it is currently.

So far I have this, in case I would have something else to do, before I move on to it and request the budget?

OBS: Sorry for my bad English.
paulo_crash is offline
NanoC
Veteran Member
Join Date: Jan 2016
Location: Argentina
Old 03-20-2019 , 17:05   Re: [CS:S/CS:GO] CT Bans
Reply With Quote #450

i like your ideas, go ahead
__________________
NanoC is offline
Send a message via Skype™ to NanoC
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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