Advertisement
Guest User

AFK

a guest
Jun 2nd, 2011
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.18 KB | None | 0 0
  1. // © copyright Liam Trott (Sa-mp Coder)
  2. /*
  3.  
  4. ***************************************
  5. ******** AFK SCRIPT BY TROTTY *********
  6. ***************************************
  7.  
  8. */
  9. #include <a_samp>
  10.  
  11. #define GREEN 0x33AA33AA
  12. #define RED 0xAA3333AA
  13.  
  14.  
  15. new IsPlayerAway[MAX_PLAYERS];
  16.  
  17. public OnPlayerCommandText(playerid, cmdtext[])
  18. {
  19.  
  20.      if(!strcmp("/away", cmdtext))
  21.      {
  22.      new pName[MAX_PLAYER_NAME];
  23.      new string[48];
  24.      GetPlayerName(playerid, pName, sizeof(pName));
  25.      format(string, sizeof(string), "%s is now Away from his/her keyboard.", pName);
  26.      SendClientMessageToAll(RED, string);
  27.      SetPlayerFacingAngle(playerid,0);
  28.      TogglePlayerControllable(playerid, 0);
  29.      IsPlayerAway[playerid] = 1;
  30.      return 1;
  31.  
  32. }
  33.  
  34.      if(!strcmp("/back", cmdtext))
  35.      {
  36.      new pName[MAX_PLAYER_NAME];
  37.      new string[48];
  38.      GetPlayerName(playerid, pName, sizeof(pName));
  39.      format(string, sizeof(string), "%s has now got his/her fingers on the keyboard now ;)", pName);
  40.      SendClientMessageToAll(GREEN, string);
  41.      SetPlayerFacingAngle(playerid, 264.3768);
  42.      TogglePlayerControllable(playerid, 1);
  43.      IsPlayerAway[playerid] = 0;
  44.      }
  45.      return 0;
  46. }
  47. // © copyright Liam Trott (Sa-mp Coder)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement