Gumikacsa

Gumikacsa's AFK

Jul 26th, 2011
600
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.24 KB | None | 0 0
  1. /*=======================
  2. Gumikacsa's AFK System @ 2011
  3. =======================*/
  4.  
  5. #pragma tabsize 0
  6.  
  7. #include <a_samp>
  8. #include <fixchars>
  9. #include <zcmd>
  10.  
  11. #define COLOR_YELLOW 0xFFFF00AA
  12. new Text3D: AFK[MAX_PLAYERS];
  13.  
  14. CMD:afk(playerid, params[])
  15. {
  16.     new string[256];
  17.     new kuldoneve[MAX_PLAYER_NAME];
  18.     SendClientMessage(playerid,0x99FF00AA,"Type /back when you back.");
  19.     GameTextForPlayer(playerid,"~r~ Are you now AFK", 5000, 1);
  20.     AFK[playerid] = Create3DTextLabel("AFK", 0xFF0000FF, 0.0, 0.0, 2.0, 40, 0, 0);
  21.     Attach3DTextLabelToPlayer(AFK[playerid],playerid, 0.0, 0.0, 0.4);
  22.     TogglePlayerControllable(playerid, 0);
  23.     GetPlayerName(playerid, kuldoneve, sizeof(kuldoneve));
  24.     format(string, sizeof(string), "%s now away from keyboard[/afk]",kuldoneve, playerid);
  25.     SendClientMessageToAll(COLOR_YELLOW, string);
  26.     return 1;
  27. }
  28. CMD:back(playerid, params[])
  29. {
  30.     new string[256];
  31.     new kuldoneve[MAX_PLAYER_NAME];
  32.     Delete3DTextLabel(AFK[playerid]);
  33.     GameTextForPlayer(playerid,"~g~ Welcome Back", 5000, 1);
  34.     TogglePlayerControllable(playerid, 1);
  35.     GetPlayerName(playerid, kuldoneve, sizeof(kuldoneve));
  36.     format(string, sizeof(string), "%s now back [/back]!", kuldoneve, playerid);
  37.     SendClientMessageToAll(COLOR_YELLOW, string);
  38.     return 1;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment