Guest User

Untitled

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