25.12.2016, 08:15
I found this
And it is working as supposed to..
But any ideas how ca I make implement this in my anti speed hack. So if player is falling it won't detect him as cheater but he will get deteted as falling.. Any ideas?
PHP код:
public FallingChecker()
{
new Float:x,Float:y,Float:z,Float:d;
for(new i =0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerPos(i,x,y,z);
d = floatsqroot((x-LastX[i] * x-LastX[i]) + (y-LastY[i] * y-LastY[i]));
if(d < 10 && (LastZ[i] - z) > 5)
{
OnPlayerFall(i);
}
LastX[i] = x;
LastY[i] = y;
LastZ[i] = z;
}
}
return 1;
}
public OnPlayerFall(playerid)
{
SendClientMessage(playerid,0x000000FF,"You are falling!");
return 1;
}
But any ideas how ca I make implement this in my anti speed hack. So if player is falling it won't detect him as cheater but he will get deteted as falling.. Any ideas?