Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if((newkeys & KEY_JUMP) && !IsPlayerInAnyVehicle(playerid))
- {
- if(GetPlayerWeapon(playerid) == 34 || GetPlayerWeapon(playerid) == 43) return 1;
- PlayerPressedJump[playerid] ++;
- SetTimerEx("PressJumpReset", 4000, false, "i", playerid); // Anti spam-trebalo bi raditi -u teoriji
- if(PlayerPressedJump[playerid] == 3) // koliko puta mora da pritisne SHIFT da bi mu izbacilo upozorenje i stavilo anim.
- {
- if(PI[playerid][Admin] < 5)
- {
- ApplyAnimation(playerid, "PED", "BIKE_fall_off", 4.1, 0, 1, 1, 1, 0, 1); // stavlja animaciju
- SCM(playerid, CRVENA, "GG Anti Cheat:{FFCC00} Zabranjeno je raditi Bunny Hop ");
- SetTimerEx("PressJump", 5000, false, "i", playerid); // koliko animacija da traje
- }
- }
- }
- if ((newkeys & KEY_ACTION) && !(oldkeys & KEY_ACTION))
- {
- if(VoziloJeBicikla(GetVehicleModel(GetPlayerVehicleID(playerid))))
- {
- new Float:Poz[5];
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);//
- ApplyAnimation(playerid, "PED", "BIKE_fall_off", 4.1, 0, 1, 1, 1, 0, 1);
- SendClientMessage(playerid, COLOR_RED,"Opomena! Zabranjeno je skakati biciklom!!");
- SetPlayerPos_H(playerid, Poz[0], Poz[1], Poz[2]+0.7);
- }
- }
- if ((oldkeys & KEY_FIRE) && !(newkeys & KEY_FIRE))
- {
- if(VoziloJeBicikla(GetVehicleModel(GetPlayerVehicleID(playerid))))
- {
- new Float:Poz[5];
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);//
- ApplyAnimation(playerid, "PED", "BIKE_fall_off", 4.1, 0, 1, 1, 1, 0, 1);
- SendClientMessage(playerid, COLOR_RED,"Opomena! Zabranjeno je skakati biciklom!!");
- // SCM(playerid, GRAD2, "[{F81414}Greska!{FFFFFF}] Niste zaposleni kao vozac autobusa!");
- SetPlayerPos_H(playerid, Poz[0], Poz[1], Poz[2]+0.7);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment