Advertisement
Guest User

Sistema AFK v0.2

a guest
Mar 30th, 2012
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.83 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3.  
  4. #define COR_B 0xFFFFFFFF
  5.  
  6. #define FILTERSCRIPT
  7. #if defined FILTERSCRIPT
  8.  
  9. #define DIALOGAFK 5000
  10.  
  11. new Nome[MAX_PLAYER_NAME];
  12. new string[256];
  13.  
  14. public OnFilterScriptInit()
  15. {
  16.     print("Sistema AFK v0.2 Carregado");
  17.     return 1;
  18. }
  19.  
  20. public OnFilterScriptExit()
  21. {
  22.     print("Sistema AFK v0.2 Descarregado");
  23.     return 1;
  24. }
  25.  
  26. public OnPlayerConnect(playerid)
  27. {
  28.     SendClientMessage(playerid, COR_B, "[FS]Sistema AFK v0.2 Criado Por .FuneraL.");
  29.     return 1;
  30. }
  31.  
  32. CMD:menuafk(playerid,params[])
  33. {
  34.     ShowPlayerDialog(playerid,DIALOGAFK,DIALOG_STYLE_LIST,"Sistema AFK v0.2","Entrar Modo AFK\nSair Modo AFK","Fechar","");
  35.     return 1;
  36. }
  37.  
  38. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  39. {
  40.     if(dialogid == DIALOGAFK)
  41.     {
  42.         if(response)
  43.         {
  44.             switch(listitem)
  45.                 {
  46.                     case 0:
  47.                     {
  48.                         GetPlayerName(playerid, Nome, MAX_PLAYER_NAME)
  49.                         format(string, sizeof(string), "[AFK]: %s Entrou em Modo AFK! (/afk)", Nome);
  50.                         SendClientMessageToAll(COR_B, string);
  51.                         SetPlayerColor(playerid,0x008800FF);
  52.                         TogglePlayerControllable(playerid, 0);
  53.                         }
  54.                     case 1:
  55.                     {
  56.                         GetPlayerName(playerid, Nome, MAX_PLAYER_NAME)
  57.                         format(string, sizeof(string), "[AFK]: %s Voltou para o Servidor! (/sairafk)", Nome);
  58.                         SendClientMessageToAll(COR_B, string);
  59.                         SetPlayerColor(playerid,COR_B);
  60.                         TogglePlayerControllable(playerid, 1);
  61.                         }
  62.                     }
  63.                 }
  64.             }
  65.     return 1;
  66. }
  67. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement