Ban System

StrikeOut System
Basically I’m looking for a system that will record if a player gets a ban that is 24 Hours or over.
Once they recieve the ban a point will be added to their account (Saved by the server)
There must also be a hook to Get / Add / Remove ban points from the players account
When they reach 3 ban marks they are permenantly banned from the server

(I need the hook because then I would like to be able to create my own in game menu that will show ban and enable admin to edit them)
(The menu should also show every player that has ban marks, not mattering whether they are ingame or not)

Thanks a lot in advance, tell me if you need any more information about this :smiley:

Hmm… I think I saw this request somewhere else, in this section. Right or not?

I haven’t seen this before but if it is found please link it back to me so I can see if it will do thanks :slight_smile:

Hmm, let me find it.

[editline]10th January 2011[/editline]

Oh, sorry for bothering you. It was actually you, in another thread where I saw this.
http://www.facepunch.com/threads/1046017-Roleplay-Plugin-Feature-requests.
Sorry!

Oh, it’s cool :stuck_out_tongue:

Sort of ironic in a way, not sure how so but it feels it for some reason

Anyways, thanks for looking anyway :smiley:

Bump Diddy 24 Hour Bump :slight_smile:

Sorry for the 3rd post in a row (I don’t like doing it), but I was wondering would I be able to do this with meta tables?

It seems as if no one will be providing a code and I will admint this was a very optimistic request, but now I’m just wondering would I be able to use Meta Tables and text files to edit and save the data?
-Also how would I make the text file save to the server only if the Meta Table is in a shared file (Or will it not save to the client anyway?)
-I got the idea from HERE

[lua]
local Player = _R.Player
Player.OldBan = Player.Ban

function Player:Ban(mins, reason)
if mins > 1440 then – Over 24 hours?
local bans = (self:GetPData(“bans”) or 0) + 1
self:SetPData(“bans”, bans)

	if bans >= 3 then
		mins = 0 -- Change to perma
	end		
end

self:OldBan(mins, reason)

end
[/lua]

Here’s the first part. It’ll permaban players if they’re banned over 24 hours 3 times. For recording to files and displaying it, someone else will have to help.

Cool, thanks for that. I wasn’t expecting someone to give me a code, I was simply asking if it could be done and obviously it can, so thanks a lot :smiley:

Note: that uses PData, and doesn’t work yet.

Fixed code slightly.

[editline]19th January 2011[/editline]

Oh noes pdata for saving data relative to a user

Would that code work in a shared file, so then I can acess when running a clientseided code (Using DSubMenu)

Or should I just run a usermessage to a server file?

It’s all serverside. You’ll have to make it save to a text file and datastream/usermessage it across to the client.

or just use sourcemod + sourceban and here fix for client crash http://forums.interwavestudios.com/topic/1893-banning-crashes-all-clients/page__p__9686__hl__garrysmod__fromsearch__1#entry9686

Cool, thanks