rice2k

SK-Staff Duty

Jun 14th, 2021 (edited)
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.02 KB | None | 0 0
  1. // NPC made by Shadow Knight
  2. if (playertouchsme) {
  3. timeout=.05;
  4. toweapons Staff/SK-Staff Duty;
  5. say2
  6. HOW TO USE:#b
  7. say "on duty" to go on duty#b
  8. say "off duty" to go off duty;
  9. }
  10. if (weaponfired) {
  11. say2
  12. HOW TO USE:#b
  13. say "on duty" to go on duty#b
  14. say "off duty" to go off duty;
  15. }
  16. if (playerenters||timeout||isweapon||playerchats) {
  17. timeout=.05;
  18. }
  19. if (isweapon) {
  20. if (timeout) {
  21. if (onduty) {
  22. if (! weaponsenabled) {
  23. enableweapons;
  24. }
  25. if (playerhearts<playerfullhearts) {
  26. playerhearts=playerfullhearts;
  27. }
  28. if (playerdarts<99) {
  29. playerdarts=99;
  30. }
  31. if (playerbombs<99) {
  32. playerbombs=99;
  33. }
  34. if (playermp<100) {
  35. playermp=100;
  36. }
  37. }
  38. }
  39. if (playerchats) {
  40. if (! onduty) {
  41. if (strequals(#c,on duty)) {
  42. set onduty;
  43. setplayerprop #c,You are now on duty!;
  44. }
  45. if (strequals(#c,off duty)) {
  46. setplayerprop #c,You are already off duty!;
  47. }}
  48. if (onduty) {
  49. if (strequals(#c,on duty)) {
  50. setplayerprop #c,You are already on duty;
  51. }
  52. if (strequals(#c,off duty)) {
  53. unset onduty;
  54. setplayerprop #c,You are now off duty!;
  55. }}}
  56. }
Add Comment
Please, Sign In to add comment