Confused
#1

I am making something that checks username or ip on connect.
And if either of them are in the table (mysql) "banned", it kicks the player,
informing them that they are banned, but i cant think of a decent way to do it
how would i see if the players name OR ip is in mysql?
and inform them that either their ip or name is banned
i have tried several ways but neither are very good
Reply
#2

There is alot ways to do this.
Method 1:

first of all you need a table with IP's and names in same column.
and then when they Connect Grab their IP and name with ( GetPlayerIP and GetPlayerName )
Then go to the mysql and find if there is that ip or name in the list you could use.


Method 2:
-Add 2 more value in players accounts. -> 1 Field for IP -> 1 field for boolen ( either banned or not ) 1 or 0
-Every time they connect check if his name is banned and also overwrite his old ip.
-when you ban a player simply make the Boolen for banned and player will be banned.

And ofcourse everytime a player joins, you'll be able to know if he have multiaccount or not.... because the ip is already associated for the old account.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)