SA-MP Forums Archive
/ban, clever or consuming? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /ban, clever or consuming? (/showthread.php?tid=413930)



/ban, clever or consuming? - rubygta - 07.02.2013

Hello, there!
Trying to make a /ban command with a twist. Instead of having them banned, I have set a PlayerVar to Banned=1 so that when they connect, it opens his/her file and checks if the person is banned, but if they join with another name, they're not banned.. How should I check for the IP? Should I make the script open all the files, aka. all the players that ever registered on the server, and check for the IP? Maybe put the banned IP in a file and then check that file for bans or is there a better way?
How would I go about doing this? Thanks in advance :3


Re: /ban, clever or consuming? - RajatPawar - 07.02.2013

Try using MySQL if possible. Or create a table for just banned users. Very easy to check through IPs in MySQL.


Re: /ban, clever or consuming? - rubygta - 07.02.2013

I've tried mysql, and I've got a DB, but I honestly can't get anything to work :P Possible that I'm a complete newb, but I find MySQL hard.


Re: /ban, clever or consuming? - Gamer_007 - 07.02.2013

See some tut. for it and btw u have to Write the ban[playerid] = 1; when a player disconnect and if he is banned.Check ****** Tut..They r helpful!