Guest User

AFKSystem

a guest
Feb 22nd, 2012
410
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.89 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define FILTERSCRIPT
  4. #define GoldColor 0xFFD700FF
  5. #define COR_VermelhoClaro 0xF60000AA
  6. #if defined FILTERSCRIPT
  7.  
  8. public OnFilterScriptInit()
  9. {
  10.     print("*********************************************");
  11.     print(" AFK System By : [EoS].FuneraL.[BC] - Ligado ");
  12.     print("*********************************************");
  13.     return 1;
  14. }
  15.  
  16. public OnFilterScriptExit()
  17. {
  18.     print("************************************************");
  19.     print(" AFK System By : [EoS].FuneraL.[BC] - Desligado ");
  20.     print("************************************************");
  21.     return 1;
  22. }
  23.  
  24. public OnPlayerConnect(playerid)
  25. {
  26.     SendClientMessage(playerid, GoldColor, "[SERVER]: Este Servidor Usa o FilterScript AFK - Feito Por : [EoS].FuneraL.[BC]");
  27.     return 1;
  28. }
  29.  
  30. public OnPlayerDisconnect(playerid, reason)
  31. {
  32.     return 1;
  33. }
  34.  
  35. public OnPlayerCommandText(playerid, cmdtext[])
  36. {
  37.     if (strcmp("/afk", cmdtext, true, 10) == 0)
  38.     {
  39.         new pname[MAX_PLAYER_NAME];
  40.         new string [256];
  41.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  42.         format(string, sizeof(string), "[FilterScript]: %s Está Ausente (/afk)", pname);
  43.         SendClientMessageToAll(0xFFD700FF, string);
  44.         SetPlayerHealth(playerid, 99999*99999);
  45.         SetPlayerColor(playerid, GoldColor);
  46.         TogglePlayerControllable(playerid,0);
  47.         return 1;
  48.     }
  49.     if (strcmp("/sairafk", cmdtext, true, 10) == 0)
  50.     {
  51.         new pname[MAX_PLAYER_NAME];
  52.         new string [256];
  53.         GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  54.         format(string, sizeof(string), "[FilterScript]: %s Voltou para o Servidor (/sairafk)", pname);
  55.         SendClientMessageToAll(0xFFD700FF, string);
  56.         SetPlayerHealth(playerid, 100);
  57.         SetPlayerColor(playerid, GoldColor);
  58.         TogglePlayerControllable(playerid,1);
  59.         return 1;
  60.     }
  61.     return 0;
  62. }
  63.  
  64. #endif
Advertisement
Add Comment
Please, Sign In to add comment