SA-MP Forums Archive
Anti Sobiet fly hack problem..Rep+ - 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: Anti Sobiet fly hack problem..Rep+ (/showthread.php?tid=559811)



Anti Sobiet fly hack problem..Rep+ - MBilal - 25.01.2015

Код:
public OnPlayerUpdate(playerid)
{
new animName[32], animLib[32], Float:playerGPos[MAX_PLAYERS][3];
GetAnimationName(GetPlayerAnimationIndex(playerid), animLib, sizeof(animLib), animName, sizeof(animName));
GetPlayerPos(playerid, playerGPos[playerid][0], playerGPos[playerid][1], playerGPos[playerid][2]);
if(strcmp(animLib, "SWIM", false) || playerGPos[playerid][2] <= 1.5)
 OnPlayerSwim(playerid, PLAYER_SWIM);
else OnPlayerSwim(playerid, PLAYER_HACK);

}



public OnPlayerSwim(playerid, status)
{
switch(status)
 {
  case PLAYER_SWIM:
 {
 }
  case PLAYER_HACK:
  {
{
new Float:animX, Float:animY, Float:animZ;
new aNim = GetPlayerAnimationIndex(playerid);
GetPlayerPos(playerid, animX, animY, animZ);
	if((aNim >= 1538) && (aNim <= 1542) && animZ > 5)
	{
	if(!IsPlayerInRangeOfPoint(playerid, 50.0,2021.3466,1673.1593,8.0484) || !IsPlayerInRangeOfPoint(playerid, 50.0,2143.2383,1285.6169,7.9766 )|| !IsPlayerInRangeOfPoint(playerid, 50.0,2101.0918,1910.8403,9.0792 ))
	{
	if(hacker[playerid] ==0)
	{
	SendClientMessage(playerid, COLOR_YELLOW, "You have been banned from the server. Reason: Sobiet Fly Hack");
	format(Jstring, 128, "Bot : %s has been banned from the server. Reason: Sobiet Fly Hack", GetName(playerid));
	SendClientMessageToAll(COLOR_KRED, Jstring);
	hacker[playerid] =1;
 SetTimerEx("BP",10,false,"d", playerid);
}
}}}}}

return 1;
 }
stock IsPlayerInWater(playerid) {
        new anim = GetPlayerAnimationIndex(playerid);
        if (((anim >=  1538) && (anim <= 1542)) || (anim == 1544) || (anim == 1250) || (anim == 1062)) return 1;
Its banning Players who are swimming in the Water......I detect the Sobiet fly hack but some places where they are swimming in water and got banned.. Help


Re: Anti Sobiet fly hack problem..Rep+ - GGW - 25.01.2015

Maybe you can add one more thing in your script , if the player speed is more than the normal Swimming speed ban him ?