sqlite ban - 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: sqlite ban (
/showthread.php?tid=601464)
sqlite ban -
Mrcroissant - 21.02.2016
Hello,
I want to introduce a range ban in a table of sqlite, i tried 123.456.789.1** However, it don't take in consideration that ** should be random numbers for a range banned.
How could i do ?
Thanks
Re: sqlite ban -
Jefff - 21.02.2016
In ban cmd use
pawn Код:
for(new i = strlen(ip)-1; i > -1; i--)
if(ip[i] == '*')
ip[i] = '%';
then in OnPlayerConnect
pawn Код:
"SELECT * FROM `range_bans` WHERE '%s' LIKE ip LIMIT 1",GetIP(playerid)