GPCI - GetPlayerClientID (maybe)
I read some topics on SA-MP forum,that said that Kye don't like that people use this function,this explain why you have to re-define it with native,because gpci is native,but undefined.
Well,i don't believe on this,you know,why the hell he do that stupid function,if he don't want that people use it ?But,perhaps,explain why it isn't defined,and why it is acronym (i think i speak that right).
Anyway,i will teach you,how to use this,his advantages,and it's disadvantages.
First,you will define it,but not with #define or #include,and yes,with native.
Code:
native gpci(playerid, serial[], len);
This is the same as:
Code:
native GetPlayerClientId(playerid, serial[], len);
But,don't define it like this,define it as gpci.
Put it right down you #includes.
Now,set a global var (string type) to save the player serial.
Code:
new pSerial[128];
You're not waiting that i will teach you how to put this on a command,and stuff right ?
The gpci function will be used like this:
Code:
gpci(playerid, pSerial, 128);
We stored the player serial on the var that we make before,now let's save it with anything:
Code:
gpci(playerid, pSerial, 128);
new file[128];
format(file,128,"%s.txt",pSerial);
if(!fexist(file)) fcreate(file);
Ok,now we create a file with every serial that we set (with commands,when player conne t,when player disconnect,etc...),now we will compare the serials on OnPlayerConnect.
Code:
new zSerial[128], serialfile[128], pName[MAX_PLAYER_NAME], info[128];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(serialfile,128,"%s.txt",zSerial);
format(info,128,"[SEC]:%s was kicked.[Reason: Hash Banned]",pName);
gpci(playerid, zSerial, 128);
if(strcmp(zSerial,file)) SendClientMessageToAll(0xFF0000FF, info) && Kick(playerid);
return 1;
Ok,so we check the player's serials,and if he have the same hash of any of the has txt files on filterscrip,he simply get his ass kicked.
Advantages of using this: :somuchwin:
- Brazilian players don't know how to bypass it.(at least,they don't know)
- Can kick annoying suckers for a long time (4 minutes if the sucker knows this)
- The banned will have to create another windows account to join again.(didn't worth it)
- You're not safe.
- This will not prevent the player from join again.
- This is not a serial ban.
- You don't need to pay nothing to get your ass back to the game.
Well,i use this,and i will keep using,you know,when some people get really annoying,this say the things that words can't say.
How to bypass it:
Maybe,if you change your operational system profile name,and delete the GTA User Files folder,you can come back.
But for a 100% bypass,simply create another account on your OS,enter with Hotspot Shield (almost every server ban the ip too),and happy trolling!
(I know that wasn't me that discover this first,but,i find it by myself for me,on my pc,i have two windows accounts,when i get banned on my first acc,2 weeks ago i enter on the server,with the another account,so,sorry guys.)