SHARE
TWEET

Untitled

a guest May 8th, 2016 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <a_samp>
  2.  
  3. #define KEY_AIM         (128)
  4. #define PRESSED(%0) \
  5.     (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  6.  
  7. PreloadAnimLib(playerid, animlib[])
  8. {
  9.     ApplyAnimation(playerid,animlib,"null",0.0,0,0,0,0,0);
  10. }
  11.  
  12. public OnFilterScriptInit()
  13. {
  14.     print("\n--------------------------------------");
  15.     print(" Simple dodge system by !Pumpkin reloaded");
  16.     print("--------------------------------------\n");
  17.     return 1;
  18. }
  19.  
  20. public OnFilterScriptExit()
  21. {
  22.     print("\n--------------------------------------");
  23.     print(" Simple dodge system by !Pumpkin unloaded");
  24.     print("--------------------------------------\n");
  25.     return 1;
  26. }
  27.  
  28.     public OnPlayerSpawn(playerid)
  29. {
  30.     PreloadAnimLib(playerid,"PED");
  31.     return 1;
  32. }
  33.  
  34. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  35. {
  36.     new playerState = GetPlayerState(playerid); // Get the killer's state
  37.     if(playerState == PLAYER_STATE_ONFOOT) // If the killer was in a vehicle
  38.     {
  39.     if (PRESSED( KEY_CROUCH | KEY_AIM ))
  40.     {
  41.     ApplyAnimation(playerid, "PED", "EV_dive", 4.1, 0, 1, 1, 1, 5, 1);
  42.     }
  43.     }
  44.     return 1;
  45. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top