Advertisement
Guest User

MasterJoker's Useful Function v1.0

a guest
Jan 25th, 2012
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. /*
  2.  
  3. MasterJoker's Useful Function Include
  4. Supportable SAMP version: 0.3c - Present
  5. Version 1.0
  6. Version v1.0 Current Function: 8 Available useful Function
  7. Release Date: January 25, 2012
  8. Brought you by Mr.SmileWinky!
  9.  
  10. */
  11.  
  12.  
  13. #if defined _MJUF_included
  14. #endinput
  15. #endif
  16.  
  17. #define _MJUF_included
  18.  
  19. #if defined MJUF
  20. #error MJUF are already defined.
  21. #endif
  22.  
  23. #include <a_samp>
  24.  
  25. #define white "{FFFFFF}"
  26.  
  27. /* stock function */
  28.  
  29. stock CreateTeleportPosition(playerid, Float:x, Float:y, Float:z, Float:ang)
  30. {
  31. SetPlayerPos(playerid, Float:x, Float:y, Float:z);
  32. SetPlayerFacingAngle(playerid, Float:ang);
  33. return 1;
  34. }
  35.  
  36. stock CreateBotChatter(COLOR, const Botname[], const text[])
  37. {
  38. new string[321];
  39. format(string,sizeof(string), "[MJUFINC][BOT] %s: "white"%s", Botname, text);
  40. SendClientMessageToAll(COLOR, string);
  41. return 1;
  42. }
  43.  
  44. stock KickAll()
  45. {
  46. for(new i = 0; i < MAX_PLAYERS; i++)
  47. {
  48. if(IsPlayerConnected(i) && (i != i))
  49. {
  50. Kick(i);
  51. }
  52. }
  53. printf("MasterJoker's Useful Function Include Kick has been used");
  54. return 1;
  55. }
  56.  
  57. stock BanAll(const reason[])
  58. {
  59. for(new i = 0; i < MAX_PLAYERS; i++)
  60. {
  61. if(IsPlayerConnected(i) && (i != i))
  62. {
  63. BanEx(i, reason);
  64. }
  65. }
  66. printf("MasterJoker's Useful Function Include Ban has been used");
  67. return 1;
  68. }
  69.  
  70. stock IncreaseHealth(playerid, Float:health)
  71. {
  72. new Float:mycurrenthp;
  73. GetPlayerHealth(playerid, mycurrenthp);
  74. SetPlayerHealth(playerid, mycurrenthp + health);
  75. printf("MasterJoker's Useful Function Increase Health Generator has been used");
  76. return 1;
  77. }
  78.  
  79. stock DecreaseHealth(playerid, Float:health)
  80. {
  81. new Float:mycurrenthp2;
  82. GetPlayerHealth(playerid, mycurrenthp2);
  83. SetPlayerHealth(playerid, mycurrenthp2 - health);
  84. printf("MasterJoker's Useful Function Decrease Health Generator has been used");
  85. return 1;
  86. }
  87.  
  88. stock IncreaseArmour(playerid, Float:armour)
  89. {
  90. new Float:mycurrentarmour;
  91. GetPlayerHealth(playerid, mycurrentarmour);
  92. SetPlayerHealth(playerid, mycurrentarmour + armour);
  93. printf("MasterJoker's Useful Function Increase Armour Generator has been used");
  94. return 1;
  95. }
  96.  
  97. stock DecreaseArmour(playerid, Float:armour)
  98. {
  99. new Float:mycurrentarmour2;
  100. GetPlayerHealth(playerid, mycurrentarmour2);
  101. SetPlayerHealth(playerid, mycurrentarmour2 - armour);
  102. printf("MasterJoker's Useful Function Decrease Armour Generator has been used");
  103. return 1;
  104. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement