Quote:
Originally Posted by RogueDrifter
There's one thing... after doing some searches i realized that the gpci id of fake clients contain more numbers rather than letters, above 30 that is, so i did something like this and so far 0 false positives and worked against most if not all fake players, Do this at OnPlayerConnect:
PHP Code:
public OnPlayerConnect(playerid)
{
new TempId[80], TempNumb;
gpci(playerid, TempId, sizeof(TempId));
for(new i = 0; i < strlen(TempId); i++)
{
if(TempId[i] >= '0' && TempId[i] <= '9')
{
TempNumb++;
}
}
if(TempNumb >= 30)
{
new BotName[MAX_PLAYER_NAME];
GetPlayerName(BotName, sizeof(BotName));
format(TempId, sizeof(TempId), "Server kicked %s, reason: suspected bot.",BotName);
SendClientMessageToAll(-1,TempId);
Kick(playerid);
}
return 1;
}
try this against them and let me know how it goes.
|
Thank you, this seems possible, I will try this. By the way, can I put your code in public OnIncomingConnection to kick the bots right after they are requesting a connection?