Anti-Bunny up ?
#1

Hi , is there any way to detect if a player bunny up and freeze him for 4Sec ?
Thanx
Reply
#2

Use the search button, theres quite a few you an use. Or implement into your own script if you give credits.
Reply
#3

Of course i will do , i'm only asking if the player jump , there are a timer if he jump again and again(so 3 jumps) he will be frozen for 4 Seconds it is like Anti-spam system he Must wait 2 or 3 sec between Jumps .
Reply
#4

http://pastebin.com/WftJvpke
http://forum.sa-mp.com/showthread.ph...Anti+bunny+hop
Reply
#5

Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if (newkeys & KEY_JUMP)
	{
		new Ticks=GetTickCount();
		if(Ticks-GetPVarInt(playerid,"LastBunnyHopMS")<4000)
		{
			new Float:X,Float:Y,Float:Z;
			GetPlayerPos(playerid,X,Y,Z);
			SetPlayerPos(playerid,X,Y,Z+30);
			GameTextForPlayer(playerid,"~p~~h~you wanna get high?",4000,4);
		}
		SetPVarInt(playerid,"LastBunnyHopMS",Ticks);
	}
	return 1;
}
tested, works, and its quite annoying lol
you want it to react on the 3rd jump in 4 seconds? this one actually reacts on the second jump in 4 secs...
nothing added to check if the player is on foot or in a vehicle. you need to add it.
Reply
#6

Thank you Babul your Script is Working Perfect for me ! thank you too SantarioLeone i will check your script . +1Rep
Reply
#7

Can be done with GetPlayerVelocity too it's better then GetPlayerPos...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)