Advertisement
Guest User

[FS] Anti-Kangaaroo by Thom_Sowop

a guest
Feb 20th, 2013
1,237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. // Anti Kangaaroo by Thom_Sowop ;)!
  2. #include <a_samp>
  3.  
  4. #define FILTERSCRIPT
  5. new JoueurAppuieJump[MAX_PLAYERS];
  6.  
  7. public OnPlayerConnect(playerid)
  8. {
  9. JoueurAppuieJump[playerid] = 0;
  10. return 1;
  11. }
  12. //==============================================================================
  13. forward AppuieJump(playerid);
  14. public AppuieJump(playerid)
  15. {
  16. JoueurAppuieJump[playerid] = 0;
  17. ClearAnimations(playerid);
  18. return 1;
  19. }
  20. forward AppuiePasJump(playerid);
  21. public AppuiePasJump(playerid)
  22. {
  23. JoueurAppuieJump[playerid] = 0;
  24. return 1;
  25. }
  26. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  27. {
  28. if((newkeys & KEY_JUMP) && !IsPlayerInAnyVehicle(playerid))
  29. {
  30. JoueurAppuieJump[playerid] ++;
  31. SetTimerEx("AppuiePasJump", 14000, false, "i", playerid);
  32.  
  33. if(JoueurAppuieJump[playerid] == 2)
  34. {
  35. ApplyAnimation(playerid, "PED", "BIKE_fall_off", 4.1, 0, 1, 1, 1, 0, 1);
  36. new string[64], pName[MAX_PLAYER_NAME];
  37. GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  38. format(string,sizeof string,"%s a trébuché et tombe directement au sol.",pName);
  39. SendClientMessageToAll(0x8DC43CC8,string);
  40. GameTextForPlayer(playerid,"~r~Bunny Hopping~w~ Interdit",3000,0);
  41. SetTimerEx("AppuieJump", 9000, false, "i", playerid);
  42. }
  43. }
  44. return 1;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement