Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Anti bunny hop FS by merK^
- Please don't remove the credits! */
- #include <a_samp>
- #define FILTERSCRIPT
- #if defined FILTERSCRIPT
- #define COLOR_GROVE 0x00FF00FF
- #define Holding(%0) \
- ((newkeys & (%0)) == (%0))
- #define Pressed(%0) \
- (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- #define COLOR_GROVE 0x00FF00FF
- #define SCM SendClientMessage
- #pragma tabsize 0
- new PlayerPressedJump[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print("Anti bunny hop FS by:merK^");
- print("--------------------------------------\n");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- PlayerPressedJump[playerid] = 0; // Sets variable to 0 when they first connect
- return 1;
- }
- forward PressJump(playerid);
- public PressJump(playerid)
- {
- PlayerPressedJump[playerid] = 0; // Reset the variable
- ClearAnimations(playerid);
- return 1;
- }
- forward PressJumpReset(playerid);
- public PressJumpReset(playerid)
- {
- PlayerPressedJump[playerid] = 0; // Reset the variable
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if (Holding (KEY_SPRINT))
- {
- if (Pressed (KEY_JUMP))
- {
- ApplyAnimation(playerid, "PED", "IDLE_tired", 4.1, 0, 1, 1, 1, 0, 1);
- SCM(playerid, COLOR_GROVE, "Pokusao si da skocis dok si trcao i uganuo si clanak.");
- SetTimerEx("PressJump", 4000, false, "i", playerid); // Tajmer koliko je "clanak uganut"
- }
- }
- return 1;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment