Guest User

AFK System By =]>AiZeAh555<[=

a guest
Oct 29th, 2014
733
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. //AFK SYSTEM BY AiZeAh555
  2. //PLEASE DONT REMOVE CREDITS
  3. #include <a_samp>
  4.  
  5. #define GREEN 0x99FF9900
  6. #define C_YELLOW 0xFFFF00AA
  7.  
  8. new string[128];
  9.  
  10. public OnFilterScriptInit()
  11. {
  12. print("\n--------------------------------------");
  13. print(" AFK SYSTEM LOADED BY aizeah555 ");
  14. print("--------------------------------------\n");
  15. return 1;
  16. }
  17.  
  18. public OnPlayerCommandText(playerid, cmdtext[])
  19. {
  20. if(strcmp("/afk", cmdtext, true) == 0)
  21. {
  22. SendClientMessage(playerid, C_YELLOW, "You are now AFK!");
  23. TogglePlayerControllable(playerid,0);
  24. new string3[70];
  25. new name[MAX_PLAYER_NAME];
  26. GetPlayerName(playerid, name, sizeof(name));
  27.  
  28. format(string3, sizeof(string3), "%s is now AFK!", name);
  29. SendClientMessageToAll(GREEN, string3);
  30. format(string, sizeof(string), "%s is now AFK!", name);
  31. GameTextForAll(string, 6000,3);
  32. }
  33. if(strcmp("/bck", cmdtext, true) == 0)
  34. {
  35. SendClientMessage(playerid, C_YELLOW, "You are Back Again!");
  36. TogglePlayerControllable(playerid,1);
  37. new string3[70];
  38. new name[MAX_PLAYER_NAME];
  39. GetPlayerName(playerid, name, sizeof(name));
  40.  
  41. format(string3, sizeof(string3), "%s is Back Again!!", name);
  42. SendClientMessageToAll(GREEN, string3);
  43. format(string, sizeof(string), "%s is Back Again!", name);
  44. GameTextForAll(string, 6000,3);
  45. return 1;
  46. }
  47. return 0;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment