(2019-10-15, 04:43 PM)Markski Wrote:(2019-10-01, 04:34 AM)Tama Wrote: Ban system with gpci + ip?
Double check, double fun LMAO XD
Why you need only hadware ID ban if you can ban someone with IP PLUS GPCI function, first you need to check their GPCI, then check their IP too.
Yeah it seems kinda waste of mem but..... :\
Both of these are easy to bypass.
How?...
There is a plenty of security you can go with, lets try with udb hash.
PHP Code:
native gpci(playerid, serial[], len);
new
YourUDB_Hash;
stock udb_hash(buf[]) {
new length=strlen(buf);
new s1 = 1;
new s2 = 0;
new n;
for (n=0; n<length; n++)
{
s1 = (s1 + buf[n]) % 65521;
s2 = (s2 + s1) % 65521;
}
return (s2 << 16) + s1;
}
public OnPlayerConnect(playerid) {
new MyUDB_Hash, MyGPCI[24], MyIP[16];
GetPlayerIp(playerid, MyIP, sizeof(MyIP));
gpci(playerid, MyGPCI, 24);
MyUDB_Hash = udb_hash(sprintf("%syour_secret_text_here%s", MyIP, MyGPCI));
if(YourUDB_Hash != MyUDB_Hash)
{
SendClientMessage(playerid, -1, "Who are you!!, if you think this is a mistake then please contact an administrator bla bla bla");
}
}
???? ???? ????? ?? ???????? ???? ?????, ?? ???? ???? ?? ?????? ?? ??? ???? ???? ???? ?? ??? ???? ??? ???? ??? ?? ?? ?????? ??????

