Guest User

Include New Functions

a guest
Jun 13th, 2014
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. // Include New Functions Samp - By ZKDarkOMG.
  2.  
  3. /* CHANGE LOG
  4.  
  5. v 1.0
  6.  
  7. - Include create.
  8.  
  9. */
  10.  
  11. // Include SAMP
  12. #include <a_samp>
  13.  
  14. // Defines
  15. #define VERSION "1.0"
  16.  
  17. // Stocks
  18.  
  19. stock SetPlayerMoney(playerid, money)
  20. {
  21. GivePlayerMoney(playerid, GetPlayerMoney(playerid));
  22. GivePlayerMoney(playerid, money);
  23. return 1;
  24. }
  25.  
  26. stock SetPlayerHealthandArmour(playerid, Float:health, Float:armour)
  27. {
  28. SetPlayerHealth(playerid, health);
  29. SetPlayerArmour(playerid, armour);
  30. return 1;
  31. }
  32.  
  33. stock SetPlayerPosInteriorWorld(playerid, Float:x, Float:y, Float:z, interior, virtualworld)
  34. {
  35. SetPlayerPos(playerid, x, y, z);
  36. SetPlayerInterior(playerid, interior);
  37. SetPlayerVirtualWorld(playerid, virtualworld);
  38. return 1;
  39. }
  40.  
  41. stock DesbugPlayer(playerid)
  42. {
  43. if(GetPlayerInterior == 0 && GetPlayerVirtualWorld == 0) return SendClientMessage(playerid, -1, "{ff0000}You are not bugged.");
  44. SetPlayerInterior(playerid, 0);
  45. SetPlayerVirtualworld(playerid, 0);
  46. return 1;
  47. }
  48.  
  49. stock QuitPlayerHealth(playerid, Float:health)
  50. {
  51. new Float:health2;
  52. GetPlayerHealth(playerid, health2);
  53. SetPlayerHealth(playerid, health2-health);
  54. return 1;
  55. }
  56.  
  57. stock QuitPlayerArmour(playerid, Float:armour)
  58. {
  59. new Float:armour2;
  60. GetPlayerArmour(playerid, armour2);
  61. SetPlayerArmour(playerid, armour2-armour);
  62. return 1;
  63. }
  64.  
  65. stock QuitPlayerHealthandArmour(playerid, Float:health, Float:armour)
  66. {
  67. new Float:health2, Float:armour2;
  68. GetPlayerHealth(playerid, health2);
  69. SetPlayerHealth(playerid, health2-health);
  70. GetPlayerArmour(playerid, armour2);
  71. SetPlayerArmour(playerid, armour2-armour);
  72. return 1;
  73. }
Advertisement
Add Comment
Please, Sign In to add comment