Advertisement
Guest User

explosive_bullets.pwn

a guest
Jun 18th, 2018
1,061
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. //Made by lokii.
  2.  
  3. //credits to samp team for samp.
  4.  
  5. #include <a_samp>
  6. #include <zcmd> //credits to zeex.
  7.  
  8. static bool:explosive[MAX_PLAYERS char] = {false,...};
  9.  
  10. public OnPlayerDisconnect(playerid, reason)
  11. {
  12. explosive{playerid} = false;
  13. return 1;
  14. }
  15.  
  16. CMD:expbullets(playerid)
  17. {
  18. static weapon, ammo;
  19. GetPlayerWeaponData(playerid, 5, weapon, ammo);
  20. if(weapon != 31)
  21. {
  22. SendClientMessage(playerid, 0xFF0000FF, "Only M4 support explosive bullets");
  23. }
  24. else
  25. {
  26. if(!explosive{playerid})
  27. {
  28. SendClientMessage(playerid, 0xFFFF00FF, "Explosive bullets on");
  29. explosive{playerid} = true;
  30. }
  31. else
  32. {
  33. SendClientMessage(playerid, 0xFFFF00FF, "Explosive bullets off");
  34. explosive{playerid} = false;
  35. }
  36. }
  37. return 1;
  38. }
  39.  
  40. public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
  41. {
  42. if(weaponid == 31 && explosive{playerid})
  43. {
  44. CreateExplosion(fX, fY, fZ, 12, 5.0);
  45. }
  46. return 1;
  47. }
  48.  
  49.  
  50. //EOF.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement