Advertisement
omgitsgodzilla

AFK system

May 4th, 2012
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.19 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3.  
  4. #define FILTERSCRIPT
  5. #if defined FILTERSCRIPT
  6.  
  7. #define COLOR_WHITE 0xFFFFFFAA
  8.  
  9. public OnFilterScriptInit()
  10. {
  11.     print("\n--------------------------------------");
  12.     print(" AFK system by [DDP]omgitsgodzilla");
  13.     print("--------------------------------------\n");
  14.     return 1;
  15. }
  16.  
  17. #else
  18.  
  19. main()
  20. {
  21.     print("\n----------------------------------");
  22.     print(" AFK system by [DDP]omgitsgodzilla");
  23.     print("----------------------------------\n");
  24. }
  25.  
  26. #endif
  27.  
  28. CMD:afk(playerid, params [])
  29. {
  30.     new string[129], pName[MAX_PLAYER_NAME];
  31.     GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  32.     SendClientMessage(playerid, COLOR_WHITE, "You are now AFK.");
  33.     format(string,sizeof string, "%s is now AFK.",pName);
  34.     SendClientMessageToAll(0xFF0000AA,string);
  35.     TogglePlayerControllable(playerid, 0);
  36.     return 1;
  37. }
  38.  
  39. CMD:back(playerid, params [])
  40. {
  41.     new string[129], pName[MAX_PLAYER_NAME];
  42.     GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
  43.     SendClientMessage(playerid, COLOR_WHITE, "You are no longer AFK.");
  44.     format(string,sizeof string, "%s is no longer AFK.",pName);
  45.     SendClientMessageToAll(0xFF0000AA,string);
  46.     TogglePlayerControllable(playerid, 1);
  47.     return 1;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement