30.08.2015, 11:22
Quote:
|
Go to this link https://sampforum.blast.hk/showthread.php?tid=504244
And scroll to connection proofing ![]() |
PHP код:
// Anti NPC spoof by [uL]Pottus
forward OnAntiCheatNPCSpoof(playerid);
public OnPlayerConnect(playerid)
{
if(IsPlayerNPC(playerid))
{
new ip[16];
GetPlayerIp(playerid, ip, sizeof(ip));
if (!!strcmp(ip, "127.0.0.1"))
{
new name[MAX_PLAYER_NAME];
format(name, sizeof(name), "%i", gettime());
SetPlayerName(playerid, name);
CallLocalFunction("OnAntiCheatNPCSpoof", "i", playerid);
return 1;
}
}
if (funcidx("AntiNPC_OnPlayerConnect") != -1)
{
return CallLocalFunction("AntiNPC_OnPlayerConnect", "i", playerid);
}
return 1;
}
#if defined _ALS_OnPlayerConnect
#undef OnPlayerConnect
#else
#define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect AntiNPC_OnPlayerConnect
forward AntiNPC_OnPlayerConnect(playerid);



