Register for your free account! | Forgot your password?

You last visited: Today at 14:09

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] Ban System [Good One!]

Discussion on [Release] Ban System [Good One!] within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
[Release] Ban System [Good One!]

Okay im back ( yes I know, it hurts .. )

Well,Ima code and release a ban system, which is NOT FOR LOTF, so you actually need to rewrite this ( this might be a good system to get leachers to learn *hopes* ) .

Well,lets start?

First,we add a HashTable, in lotf, add it under AllChars hashtable ( i think, not having a lotf source opened ) .

Code:
public static Hashtable BannedUsers = new Hashtable();

Good,learn how to finally copy paste eh'.

Well,lets move on.


Do a void ( guess where? -.- ) , should look SOMETHING like this but you have to rewrite it, dont think its written in lotf source.


Code:
public void CheckIfBan(GameClient Client)
        {
            if (Everything.BannedUsers.Contains(Client.Username))
            {
                MessageInfo Msg = new MessageInfo("", "ALLUSERS", Color.White, ChatType.Dialog);
                Msg.dwParam = Client.Entity.UID;
                Msg.Message = "Your account : " + Client.Username + " is banned. Please speak to the server admin";
                Client.Send(PacketBuilder.Message(Msg));
            }
        }


Good!

Now, add a command to ban players. Also,this is nothing like LOTF,and this command isnt even done since im written it directly at e*pvp . This is just an example:


Code:
case "/banuser":
                    Everything.BannedUsers.Add(Client.Username, Client);
                    break;


It SHOULD work, not really sure since I tested it once then rewrote it a bit. Anyways this should get some people to learn since this isnt nooby style,lawl,even tho this isnt the best way.

Emme
_Emme_ is offline  
Thanks
1 User
Old 11/18/2008, 18:12   #2
 
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Just to let you know, the dwParam for messages doesn't need to be the auth/key ID.
I really have no clue what the f*k it is, but you can set it to 0 and it still works.
tao4229 is offline  
Old 11/18/2008, 19:30   #3

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Got it working but all it does is DCing the Char
oh well i didn't got compiling errors so that's at least something lol
Kiyono is offline  
Old 11/18/2008, 19:40   #4
 
elite*gold: 0
Join Date: Jul 2005
Posts: 157
Received Thanks: 14
Quote:
Originally Posted by Djago160 View Post
Got it working but all it does is DCing the Char
oh well i didn't got compiling errors so that's at least something lol
make sure that when u make that command it also add a status 3 to the player status..which will cause it to get banned and also you need to make sure status 3 is a banned status in your source
vietkidd510 is offline  
Old 11/18/2008, 19:48   #5
 
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Lol, you have to save the hashtable somehow, otherwise everytime the server goes down, the ban will go away.
tao4229 is offline  
Old 11/18/2008, 20:03   #6
 
Sorsha's Avatar
 
elite*gold: 0
Join Date: Nov 2008
Posts: 40
Received Thanks: 1
I like this one, would use it but i just restarted my project again. Best whishes

Edit: Well the way i would do it would make a warning system/jail system
1=Warned and Char gets jailed for a day.
2=Gm warns him, he is banned for a day.
3=Char is jail for week.
4=Char Banned and the person can have a chance to appeal.
KMA - /rape tao4429
Sammi
Sorsha is offline  
Old 11/18/2008, 20:18   #7

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Well i was just trying to see if i could "change" it to work
the ban command i have (which is already released) is this :

Code:
                                        if (Splitter[0] == ".ban")
                                        {
                                            foreach (DictionaryEntry DE in World.AllChars)
                                            {
                                                Character Char = (Character)DE.Value;

                                                if (Char.Name == Splitter[1])
                                                {
                                                    DataBase.Ban(Char.MyClient.Account);
                                                    Char.MyClient.Drop();
                                                }
                                            }
                                        }
and there is something in the DB but to lazy to copy and paste that but this works
Kiyono is offline  
Old 11/18/2008, 20:24   #8


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
Djago - ruining the fun... -.-
KraHen is offline  
Old 11/18/2008, 20:50   #9

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Quote:
Originally Posted by ElDeRnEcRo View Post
Djago - ruining the fun... -.-
It doesn't work with just the command...

And i didn't provided the DataBase.Ban(Char.MyClient.Account);
Kiyono is offline  
Old 11/18/2008, 21:06   #10
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
If anyone wonders,this is what it do:

When you login, it checks if your character's username is in the BannedUser's hashtable. If it is, it disconnect and instead of "Connection to the server interupted" or whatever it is, it say this:

"Your account USERNAME has been banned. Speak to admin about this"

So,it replace the normal disconnect message to that one,which I think is great,disagree if you like.
_Emme_ is offline  
Old 11/18/2008, 21:10   #11
 
© Haydz's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 1,042
Received Thanks: 252
Should just add a banned bool into the accounts table and check it at login, no need for a hash then
© Haydz is offline  
Old 11/18/2008, 21:21   #12
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
That's true,never thought of that.
_Emme_ is offline  
Reply


Similar Threads Similar Threads
[Release] Dye System
06/23/2010 - EO PServer Guides & Releases - 59 Replies
The following release is bought to you by me "funhacker" aka BiG-MaC of ACME EO, this system allows players to dye their casuals into 4 different colours, bringing about another 90possible casuals making it hit over the 100s. This system isn't 100% complete I still have to locate the royalattire miraclelight dragoncorselet and emerald robe textures and fix a bug with the silver wings. I haven't added ones like pinkromance tranquiltime and elven dance yet. Icons haven't been fully...
Free MMORPG with GOOD crafting system?
10/12/2009 - Main - 6 Replies
Hey guys... I am looking for a game with a good crafting system and it should be 3D cause i don´t like browser mmos like Runescape...its like getting eye-cancer...^^ It should be Free 2 play and also should have a nice gameplay system... Hope you are able to help me ;) Greetings:bandit:
[Release] System.Mrs
01/17/2009 - GunZ - 8 Replies
Alrite I have this system (MADE BY ME AND 2 OF MY IGUNZ FRIEND) It's a rar file so the readme is inside too and the system.mrs file Note:You have to extract it with winRAR Q:How to Download winRAR? Ans:Search google and type winRAR..Duh...I am very lazy to tell you the website Any suggestion is welcome.If the system doesn't work,reply me.
[Release] Septimus's System.mrs
03/10/2008 - GunZ - 0 Replies
What this system has is: - World Items heal full hp and ap - Med kits heal full hp and ap - 5 or more clips of med kits - Quest God Mode - Cuss filter disabled, ALL swear words are disabled - World Items Spawn Faster - Repair kits are now Bullet kits and give you full ammo - Edited the range of all daggers, only works in Quest Mode, Don't know if its patched yet.
[RELEASE]System MRS
02/27/2008 - GunZ - 6 Replies
First of all i just want to say... U DO NOT NEED TO INJECT ANYTHING this mrs hack gives u: Perfect aim for all weapons. 175 delay for all swords a "mob shotgun" it's the Breaker 3 i believe- Gives u 0 delay and 99999 ammo (doesnt work on ppl) cuss filter destroyed... and thats it i think.....



All times are GMT +1. The time now is 14:10.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.