Guest User

Anti Sawnoff Fast Reload

a guest
May 14th, 2014
986
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. /* Anti Sawnoff Fast Reload Script
  2. @author: uG.Combacior
  3. @date: 14.05.2014
  4. Please don't delete the information about me, thanks!
  5. */
  6.  
  7. new pShots[MAX_PLAYERS];
  8.  
  9. public OnFilterScriptInit() return 1;
  10.  
  11. public OnPlayerConnect(playerid)
  12. {
  13. pShots[playerid] = 99999;
  14. return 1;
  15. }
  16.  
  17. public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
  18. {
  19. if(weaponid == 26 && !IsPlayerInAnyVehicle(playerid))
  20. {
  21. new p_ammo = GetPlayerAmmo(playerid);
  22.  
  23. if(pShots[playerid] > p_ammo) pShots[playerid] = p_ammo - 3;
  24. if(pShots[playerid] == p_ammo)
  25. {
  26. if(GetPlayerWeaponState(playerid) != 1)
  27. {
  28. SetPlayerArmedWeapon(playerid, 0);
  29. ApplyAnimation(playerid, "PED", "getup", 4.1, 0, 1, 1, 0, 0, 1);
  30. }
  31. pShots[playerid] = 99999;
  32. }
  33. }
  34. return 1;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment