Guest User

Untitled

a guest
Dec 29th, 2016
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. if(strcmp(cmd, "/heal", true) == 0)
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. tmp = strtok(cmdtext, idx);
  6. GetPlayerName(playerid, sendername, sizeof(sendername));
  7. new location = PlayerInfo[playerid][pLocal];
  8. if(!strlen(tmp))
  9. {
  10. if(location != 255)
  11. {
  12. if(location < 99)
  13. {
  14. if(HouseInfo[location][hArm] == 1 && IsACop(playerid))
  15. {
  16. SetPlayerArmour(playerid,99);
  17. PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
  18. format(string, sizeof(string), "You have been healed to 100 armour.");
  19. SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
  20. }
  21. else
  22. {
  23. format(string, sizeof(string), "This place does not have armour upgrades.");
  24. SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
  25. }
  26. if(HouseInfo[location][hHel] == 1)
  27. {
  28. new Float:tempheal;
  29. GetPlayerHealth(playerid,tempheal);
  30. if ( tempheal < 99)
  31. {
  32. SetPlayerHealth(playerid, 99);
  33. PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
  34. format(string, sizeof(string), "You have been healed to 100 health.");
  35. SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
  36. }
  37. else
  38. {
  39. SendClientMessage(playerid, TEAM_GREEN_COLOR,"You are already healed to 100.");
  40. }
  41. }
  42. else
  43. {
  44. format(string, sizeof(string), "This place does not have healing upgrades.");
  45. SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
  46. }
  47. return 1;
  48. }
  49. if(location == 101 || location == 99)//Restaurant & GSLS
  50. {
  51. new Float:tempheal;
  52. GetPlayerHealth(playerid,tempheal);
  53. if(tempheal < 99)
  54. {
  55. SetPlayerHealth(playerid,99);
  56. PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
  57. format(string, sizeof(string), "You have been healed to 100 health.");
  58. SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
  59. }
  60. else
  61. {
  62. SendClientMessage(playerid, TEAM_GREEN_COLOR,"You are already healed to 100.");
  63. }
  64. }
  65. if(location == 102 && IsACop(playerid)) // Armoury
  66. {
  67. SetPlayerHealth(playerid,99);
  68. format(string, sizeof(string), "* %s puts on body armour.", sendername);
  69. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  70. TogglePlayerControllable(playerid, 0);
  71. GetPlayerPos(playerid, Unspec[playerid][sPx], Unspec[playerid][sPy], Unspec[playerid][sPz]);
  72. Unspec[playerid][sPint] = PlayerInfo[playerid][pInt];
  73. Unspec[playerid][sLocal] = PlayerInfo[playerid][pLocal];
  74. SetPlayerPos(playerid,255.3,77.4,1003.6);
  75. PlayerInfo[playerid][pLocal] = 255;
  76. SetPlayerInterior(playerid,99);
  77. Spectate[playerid] = 257;
  78. }
  79. }
  80. else
  81. {
Advertisement
Add Comment
Please, Sign In to add comment