Advertisement
whiplk

Sistema AFK- Version Willian

Sep 16th, 2011
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.47 KB | None | 0 0
  1. /*----------------------------------------------------------------------------*\
  2. *                 FilterScript AFK - Version Willian                           *
  3. *                 Créditos: Willian_Luigi                                      *
  4. \*----------------------------------------------------------------------------*/
  5. #include <a_samp>
  6.  
  7. public OnFilterScriptInit()
  8. {
  9.     print("\n*************************************************");
  10.     print("*-----------------------------------------------*\n");
  11.     print(" FilterScript AFK-Version w1 By: Willian_Luigi");
  12.     print("\n*-----------------------------------------------*");
  13.     print("*************************************************\n");
  14.     return 1;
  15. }
  16. new v[3];
  17. public OnPlayerCommandText(playerid, cmdtext[])
  18. {
  19.     new
  20.         string[128],
  21.         nome[MAX_PLAYER_NAME]
  22.     ;
  23.     if(!strcmp(cmdtext,"/AFK", true))
  24.     {
  25.         static
  26.                 Float:wX,
  27.                 Float:wY,
  28.                 Float:wZ,
  29.                 sStr[60]
  30.         ;
  31.         TogglePlayerControllable(playerid, 0);
  32.         Create3DTextLabel("Player em /AFK - version Willian",0xF00ECAA,wX,wY,wZ,50.0,0);
  33.         Attach3DTextLabelToPlayer(Text3D:1,playerid,0.0,0.0,4.0);
  34.         gettime(v[0],v[1],v[2]);
  35.         format(string,55,"\nVocê entrou no mode AFK as - {FFF2AA}%d:%d:%d\n\n ",v[0],v[1],v[2]);
  36.         ShowPlayerDialog(playerid, 1234, DIALOG_STYLE_MSGBOX,"{FFF2AA}AFK - version Willian",string,"Sair AFK","");
  37.         GetPlayerName(playerid,nome,sizeof(nome));
  38.         format(sStr,60,"%s entrou no mode AFK - version Willian",nome);
  39.         SendClientMessageToAll(0xECEAECAA,sStr);
  40.         return SendClientMessage(playerid, 0x4DFF00AA, "Você entrou em /AFK - version Willian, para sair digite /AFK novamente");
  41.     }
  42.     return 0;
  43. }
  44.  
  45. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  46. {
  47.     if(dialogid == 1234)
  48.     {
  49.         if(response == 0)
  50.         {
  51.             new sStr[80];
  52.             format(sStr,55,"\nVocê entrou no mode AFK as - {FFF2AA}%d:%d:%d\n\n ",v[0],v[1],v[2]);
  53.             ShowPlayerDialog(playerid, 1234, DIALOG_STYLE_MSGBOX,"{FFF2AA}AFK - version Willian",sStr,"Sair AFK","");
  54.             return 1;
  55.         }
  56.         if(response == 1)
  57.         {
  58.             TogglePlayerControllable(playerid, 1);
  59.             Delete3DTextLabel(Text3D:1);
  60.             return SendClientMessage(playerid, 0x4DFF00AA, "Você saiu do /AFK - version Willian.");
  61.         }
  62.         return 1;
  63.     }
  64.     return 1;
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement