• [RELASE] Why the fuck did I get banned?
    1 replies, posted
  • Avatar of Matt W
  • [lua]if (SERVER) then require("gatekeeper") // Include the old gatekeeper :D if !gatekeeper then print("You failed.") // :( return end local function fl_CheckBanStatus(name, pass, steamid) // Will stop the kids who don't know how to navigate to the website moaning. if (ULib.bans[steamid]) then // Check if they are banned local bantab = ULib.bans[steamid] // Get all the details local name = bantab.name or "*Unknown*" local unbanned = bantab.unban or 0 local admin = bantab.admin or "Console" local reason = bantab.reason or "*Unknown*" local time = "*Unknown*" if (!bantab.time || bantab.time == 0) then // Format the time (kinda) make it look a bit nicer time = "never" end time = "in "..bantab.time.." mins" for _, v in pairs(player.GetAll()) do // Alert all the admins that a player who is banned has attempted to join if v:IsAdmin() then v:PrintMessage(HUD_PRINTCONSOLE, Format("Player: '%s' (%s) attempted to join but was banned", name, steamid)) end end return {false, Format("Sorry, you are currently banned for: '%s' by '%s'. The ban expires %s.", reason, admin, time)} // And return the gatekeeper message end end hook.Add("PlayerPasswordAuth", "fl_CheckBanStatus", fl_CheckBanStatus) end [/lua] Made it a few weeks ago for a community, community wasn't interested in it so I decided to release it here. Only works with ULX at the moment and requires gatekeeper. Basically it just replaces the "You are banned" box when you're banned from a server with this. I'm releasing this AS IS with no bugfixes in the future. I made this so when kids get banned from your darkrp server, it gives them something to read hence giving them a better education and delaying devnull by a little bit. Also wat le fuk is up with this [IMG]http://puu.sh/170et [/IMG] [editline]20th September 2012[/editline] also the lua tags get messed up every time I edit it :<
  • Avatar of gamerpaddy
  • Should be fixed for Evolve.. i haven't tested this script.. maybe it brings an error or doesnt work but reading the ev_playerinfo.txt out of glon decoded table works [LUA]--Original by Matt W --modified for evolve by gamerpaddy --not tested, too lazy to load gatekeeper if (SERVER) then require("gatekeeper") // Include the old gatekeeper :D local db = "ev_playerinfo.txt" local pdb = {} local tdb = {} if !gatekeeper then print("You failed.") // :( return end if file.Exists(db,false) then local buf = file.Read(db) local dbt = glon.decode(buf) --print("Entries found:"..#dbt) tdb=dbt else tdb = {} local dbt = "Did you installed Evolve correctly?" error("ERR_NO_EVOLVEDB_FILE") end local function fl_CheckBanStatus(name, pass, steamid) // Will stop the kids who don't know how to navigate to the website moaning. if type(tdb) == "string" then error(tdb) return end for k,v in pairs(tdb) do for k1,v1 in pairs(v) do if v.BanReason != nil then local name = v.Nick or "*Unknown*" local rank = v.Rank or 0 local admin = v.BanAdmin or "Console" local reason = v.BanReason or "*Unknown*" local time = "" if (!v.BanEnd|| v.BanEnd== 0) then // Format the time (kinda) make it look a bit nicer time = "never" end time = "in "..(v.BanEnd-CurTime()).." mins" for _, v1 in pairs(player.GetAll()) do // Alert all the admins that a player who is banned has attempted to join if v1:IsAdmin() then v1:PrintMessage(HUD_PRINTCONSOLE, Format("Player: '%s' (%s) attempted to join but was banned", name, steamid)) end end return {false, Format("Sorry, you are currently banned for: '%s' by '%s'. The ban expires %s.", reason, admin, time)} // And return the gatekeeper message end end end end hook.Add("PlayerPasswordAuth", "fl_CheckBanStatus", fl_CheckBanStatus) end[/LUA] @ wat le fuk is up wit this yur browsr hav problms with lua, learn java or c++