Is Player Falling
#1

someone sent me this a while ago and ive finally got time to test it and it totally doesn't work it thinks your always falling...

can someone fix it please?

Код:
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)
			{
				IsPlayerFalling[i] = 1;
			}
			else
			{
				IsPlayerFalling[i] = 0;
			}
			LastX[i] = x;
			LastY[i] = y;
			LastZ[i] = z;
		}
	}
}
or maybe theirs a totally different way to script it... it need to detect the last x y and z and if the z is greater... the player is falling.

Thanks,
Ethan
Reply
#2

I can only suggest you put in some debug stuff (SendClientMessage) there to see what the values are at a given point during it.
Reply
#3

hmm what is that?

Like if accidently or there is bug that sometimes on spawn you fall from sky, and that fixes that?

Sounds intresting and i could need that, since rarely i fall from sky, but i should spawn from my house....
Reply
#4

its more for if you jump out of a plane, my anticheat is very sensitive and if you jump outa plane it will think your airbreaking.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)