Advertisement
Guest User

Untitled

a guest
Apr 20th, 2013
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. /*==============================================================================
  2. ========= Made By : J4mmyHD=====================================================
  3. =============================== JAFK System=====================================
  4. ============ DONT REMOVE CREDITS ===============================================
  5. ==============================================================================*/
  6.  
  7. //==============================================================================
  8. // Includes
  9. //==============================================================================
  10. #include <a_samp>
  11.  
  12. //==============================================================================
  13. // Makeing it a Filterscript
  14. //==============================================================================
  15. #define FILTERSCRIPT
  16. #if defined FILTERSCRIPT
  17. #define COLOR_LIGHTBLUE 0x33CCFFAA
  18.  
  19. //==============================================================================
  20. // The User Saves.
  21. //==============================================================================
  22. new Float:Health[MAX_PLAYERS];
  23. new Float:x, Float:y, Float:z;
  24.  
  25. //==============================================================================
  26. // The Script
  27. //==============================================================================
  28. public OnFilterScriptInit()
  29. {
  30. print("========================================");
  31. print("============== JAFK System =============");
  32. print("========================================");
  33. return 1;
  34. }
  35.  
  36. public OnFilterScriptExit()
  37. {
  38. return 1;
  39. }
  40.  
  41. public OnPlayerCommandText(playerid, cmdtext[])
  42. {
  43. if (strcmp("/afk", cmdtext, true, 10) == 0)
  44. {
  45. GetPlayerHealth(playerid, Health[playerid]);
  46. GetPlayerPos(playerid, x, y, z);
  47. SetPlayerHealth(playerid, 99999999999);
  48. SetPlayerPos(playerid, 0, 0, -90);
  49. TogglePlayerControllable(playerid, 1);
  50. SendClientMessage(playerid, COLOR_LIGHTBLUE, "AFK :{FFFFFF} You are now AKK! (use /back to play again!)");
  51. return 1;
  52. }
  53. if (strcmp("/back", cmdtext, true, 10) == 0)
  54. {
  55. SetPlayerHealth(playerid, Health[playerid]);
  56. SetPlayerPos(playerid, x, y, z);
  57. TogglePlayerControllable(playerid, 0);
  58. SendClientMessage(playerid, COLOR_LIGHTBLUE, "AFK :{FFFFFF} You are no longer AFK, Welcome back!");
  59. return 1;
  60. }
  61. return 0;
  62. }
  63.  
  64. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement