Guest User

Untitled

a guest
Aug 21st, 2012
428
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. /*
  2.  
  3. [FS]Away From Keyboard
  4.  
  5. Provided By, Akira297
  6.  
  7. SA:MP Forums
  8.  
  9.  
  10. */
  11. #include <a_samp>
  12.  
  13. #if defined FILTERSCRIPT
  14.  
  15. public OnFilterScriptInit()
  16. {
  17. print("\n--------------------------------------");
  18. print(" [FS]Away From Keyboard");
  19. print("--------------------------------------\n");
  20. return 1;
  21. }
  22.  
  23. public OnFilterScriptExit()
  24. {
  25. return 1;
  26. }
  27.  
  28. #else
  29.  
  30. main()
  31. {
  32. print("\n----------------------------------");
  33. print(" Closing-[FS]Away From Keyboard");
  34. print("----------------------------------\n");
  35. }
  36. public OnPlayerCommandText(playerid, cmdtext[])
  37. {
  38. if (strcmp("/afk", cmdtext, true, 4) == 0)
  39. {
  40. new name[MAX_PLAYER_NAME];
  41. GetPlayerName(playerid, name, 24);
  42. SendClientMessage(playerid, 0xFF0000AA, "You have left your keyboard..");
  43. SetPlayerVirtualWorld(playerid, 1337);
  44. TogglePlayerControllable(playerid, 0);
  45. return 1;
  46. }
  47. if (strcmp("/back", cmdtext, true, 5) == 0)
  48. {
  49. new name[MAX_PLAYER_NAME];
  50. GetPlayerName(playerid, name, 24);
  51. SendClientMessage(playerid, 0xFF0000AA, "You've returned to your key-board continue your game-play.");
  52. SetPlayerVirtualWorld(playerid, 0);
  53. TogglePlayerControllable(playerid, 1);
  54. return 1;
  55. }
  56. return 0;
  57. }
  58. #endif
Advertisement
Add Comment
Please, Sign In to add comment