SA-MP Forums Archive
Gpci - 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: Gpci (/showthread.php?tid=629335)



Gpci - Riccardomen - 25.02.2017

The script doesn't kick me while it have the same "serial" saved into SerialBans.txt file


// ONPLAYERCONNECT

Код:
if(!fexist("SerialBans.txt")) return 1;
	new serialid[164];
	gpci(playerid, serialid, sizeof(serialid));
	new File:sfile = fopen("SerialBans.txt", io_read);
	if(sfile)
	{
	    new banstr[164];
	    
	
		while(fread(sfile, banstr))
		{
			if(!strcmp(banstr, serialid))
			{
				SendClientMessage(playerid, 0x6EF83CFF, "blabla");
				SetTimerEx("kick",100, false, "i", playerid);
			}
		}
		fclose(sfile);
	}



Re: Gpci - Vince - 25.02.2017

As far as I know fread reads the entire line with line endings (\r\n) included. Can be solved quite easily by specifying a max length of 40.


Re: Gpci - Runn3R - 25.02.2017

gpci is not unique.

There will be a collision for most efficiency compare the players password length or part of the password and the gpci hence everyone uses the same password when they make a new account and ban evade.

You can also get a geoIP include and use it to see if the banned gpci is from the correct country to see that the user is ban evading.

And also new cheats automatically changes the users gpci every time the user logs in so there is no point in doing this other than detecting cheaters by comparing their old gpci with the new one but you don't know when the user logged in from the same pc..