Biiig question, help
#8

Hmm... that's a really tricky one.

What I'd suggest to do is:

Create a new table with the IP, and A Tinyint called active. the size of IP should be 50, and the size of the Tinyint should be 15.

Now, the whole concept is, when the user is banned, their IP is sent to the table, and the Tinyint called 'active' is set to one. After that, go back to the gamemode and do this.

You need to create something that checks the table for that IP the user connects with, and see if the 'active' is set to either 1, or 0. If it is 1, refuse the connection, by kicking the player. If it is 0, let them connect.

So:

pawn Код:
new
       k[1][50],
       string[128], //optional; if you have a global query, delete this
       pIP[16]; //for player IP

   GetPlayerIp(playerid, pIP, 16);

    format(string, 128, "SELECT IP from TableName WHERE active = 1");
    mysql_query(string);
    mysql_store_result();
    mysql_free_result();

//and so on
But note, you might get a bug where it checks all the IP's, when you're only looking for the one IP the user connected with, be careful. And this has not even been tested, so don't blame me if it doesn't work. I'm trying to help you get a headstart on this.
Reply


Messages In This Thread
Biiig question, help - by NewbBeginner - 22.12.2010, 18:33
Re: Biiig question, help - by propilot - 22.12.2010, 18:34
Re: Biiig question, help - by NewbBeginner - 22.12.2010, 18:50
Re: Biiig question, help - by NewbBeginner - 22.12.2010, 20:20
Re: Biiig question, help - by Raimis_R - 22.12.2010, 20:50
Re: Biiig question, help - by Face9000 - 22.12.2010, 21:00
Re: Biiig question, help - by NewbBeginner - 22.12.2010, 21:58
Re: Biiig question, help - by Hiitch - 23.12.2010, 01:19
Re: Biiig question, help - by Alice[WS] - 23.12.2010, 02:14
Re: Biiig question, help - by NewbBeginner - 24.12.2010, 23:05

Forum Jump:


Users browsing this thread: 1 Guest(s)