Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new AFK[MAX_PLAYERS];
- new Text3D:AFKMSG[MAX_PLAYERS];
- stock IsPlayerInAFK(playerid,AFK[])
- {
- if(AFK = 1)
- {
- TogglePlayerControllable(playerid,0);
- SendClientMessage(playerid,"You're alredy AFK! Type /back to return");
- SetPlayerHealth(playerid,999999);
- AFKMSG[playerid] = Create3DTextLabel("I'm Away From Keyboard", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
- Attach3DTextLabelToPlayer(AFKMSG[playerid],playerid,0.0, 0.0, 0.7);
- return 1;
- }
- if(AFK = 0)
- {
- TogglePlayerControllable(playerid,1);
- SendClientMessage(playerid,"You're returned to AFK!");
- SetPlayerHealth(playerid,100);
- DeletePlayer3DTextLabel(playerid,PlayerText3D:AFKMSG);
- return 1;
- }
- return AFK(playerid,AFK[]);
- }
Add Comment
Please, Sign In to add comment