Guest User

Untitled

a guest
Jan 23rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.85 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. /* Daniele_Tom AFK System
  4. I hope you like it! :D
  5. */
  6.  
  7. new AFK[MAX_PLAYERS];
  8. new Text3D:AFKMSG[MAX_PLAYERS];
  9.  
  10. stock IsPlayerInAFK(playerid,AFK[])
  11. {
  12.     if(AFK = 1)
  13.     {
  14.             TogglePlayerControllable(playerid,0);
  15.             SendClientMessage(playerid,"You're alredy AFK! Type /back to return");
  16.             SetPlayerHealth(playerid,999999);
  17.                 AFKMSG[playerid] = Create3DTextLabel("I'm Away From   Keyboard", 0x008080FF,                30.0,40.0,50.0, 40.0, 0);
  18.             Attach3DTextLabelToPlayer(AFKMSG[playerid],playerid,0.0, 0.0, 0.7);
  19.         return 1;
  20.     }
  21.    
  22.     if(AFK = 0)
  23.     {
  24.         TogglePlayerControllable(playerid,1);
  25.             SendClientMessage(playerid,"You're returned to AFK!");
  26.             SetPlayerHealth(playerid,100);
  27.             DeletePlayer3DTextLabel(playerid,PlayerText3D:AFKMSG);
  28.             return 1;
  29.     }
  30.    
  31.        
  32.     return AFK(playerid,AFK[]);
  33. }
Add Comment
Please, Sign In to add comment