Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 21st, 2010 | Syntax: PAWN | Size: 1.90 KB | Hits: 102 | Expires: Never
Copy text to clipboard
  1.         if (strcmp("/afk", cmdtext, true, 10) == 0)
  2.         {
  3.         if((afkbrb) == 0)
  4.             {
  5.             afkbrb1[playerid]=1;
  6.                     //new string[48];
  7.                     new string1[48];
  8.             GetPlayerName(playerid, playername, sizeof(playername));
  9.             format(string1, sizeof(string1), "%s is now AFK.", playername);
  10.             SendClientMessageToAll(COLOR_LIGHTBLUE, string1);
  11.                 AFK[playerid] = Create3DTextLabel("AFK",0x008080FF,0.0,0.0,0.0,20,0,1);
  12.             Attach3DTextLabelToPlayer(AFK[playerid], playerid, 0.0, 0.0, -0.6);
  13.             TogglePlayerControllable(playerid,0);
  14.             afkbrb = 1;
  15.                     return 1;
  16.                 }else
  17.                 SendClientMessage(playerid, 0x99ffccff,".AFK - àúä ëáø áîöá");
  18.                                 return 1;
  19.         }
  20.         //}
  21.  
  22.         if (strcmp("/back", cmdtext, true, 10) == 0)
  23.         {
  24.                 if((afkbrb) == 1)
  25.                 {
  26.                 //    new string[48];
  27.                 afkbrb1[playerid]=0;
  28.             format(string, sizeof(string), "%s is now Back.", playername);
  29.             SendClientMessageToAll(COLOR_LIGHTBLUE, string);
  30.             Delete3DTextLabel(Text3D:AFK[playerid]);
  31.             TogglePlayerControllable(playerid,1);
  32.             afkbrb = 0;
  33.                     return 1;
  34.                 }else
  35.             SendClientMessage(playerid, 0x99ffccff,".AFK - àúä ìà áîöá");
  36.                         return 1;
  37.         }
  38.   //  }
  39.  
  40.  
  41.  
  42.  
  43.  
  44.         if(strcmp(cmdtext, "/afklist", true) == 0)
  45.         {
  46.             if(IsPlayerConnected(playerid))
  47.                 {
  48.                 new count = 0;
  49.                         SendClientMessage(playerid, COLOR_LIGHTGREEN, "AFKS Online:");
  50.                         for(new i=0; i < MAX_PLAYERS; i++)
  51.                         {
  52.                                 if(IsPlayerConnected(i))
  53.                                 {
  54.                         if((afkbrb) == 1)
  55.                         {
  56.                                         GetPlayerName(i, giveplayer, sizeof(giveplayer));
  57.                                         format(string, sizeof(string), "[ID: %d] %s", i,giveplayer);
  58.                                                 SendClientMessage(playerid,COLOR_WHITE,string);
  59.                                                 count++;
  60.                                         }
  61.                                 }
  62.                         }
  63.                         if(count == 0)
  64.                         {
  65.                                 SendClientMessage(playerid,COLOR_RED,"* àéï çáøé àô÷ îçåáøéí.");
  66.                         }
  67.                 }
  68.                 return 1;
  69.         }