Jump to content

Ban Manager


.:HyPeX:.

Recommended Posts

Hello guys, i'm just starting for my first time in my life with XML files and i'm not sure how to work this out.. The idea is to make a record of all bans to be saved on a file.. my idea was to make a record each time a ban was done.. according to what i've readed on wiki.. but i'm still not sure how to do this.. i'll thank any help in advance:

  
  
function CreateBanNode() 
local RootNode = xmlCreateFile("Bans.xml"," Bans") 
local NewNode = xmlCreateChild(RootNode, Nick) 
end 
addCommandHandler("cf", CreateBanNode) 
  
function OnbanPlayer() 
if banPlayer then  
tostring ( target )  
local NewNode = xmlCreateChild(RootNode, "Nick: target()") 
  
end 
end 
addEventHandler("onPlayerBan, CreateBanNode", getRootElement(), OnbanPlayer) 

Link to comment

My idea was to create a Ban List Like:

  
<Bans> 
          <Nick: Player1> <Player Name: #0ac300Player1> <Serial: 0agh321> <IP: 192.44.489.58> <Ban Time: 3 days> <Ban Reason: Spamming> <Banned By: HyPeX> <Time Left banned: 1 day, 13 hours, 54 minutes, 30 seconds> 
          <Nick: Player2> <Player Name: #0ac300Player2> <Serial: hag5321> <IP: 192.45.129.85> <Ban Time: 1 days> <Ban Reason: hacking> <Banned By: HyPeX> <Time Left banned: 13 hours, 34 minutes, 59 seconds> 
</Bans> 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...