Guest User

Untitled

a guest
Feb 5th, 2012
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. #include <a_samp>
  2. #include <core>
  3.  
  4. #pragma tabsize 0
  5. #define orange 0xFF9900AA
  6. #define COLOR_RED 0xAA3333AA
  7. #define COLOR_YELLOW 0xFFFF00AA
  8. #define COLOR_WHITE 0xFFFFFFAA
  9.  
  10. new InAFK[MAX_PLAYERS];
  11. new Text3D:LeTmE[MAX_PLAYERS];
  12. //------------------------------------------------------------------------------------------------------
  13.  
  14. main()
  15. {
  16. print("\n----------------------------------");
  17. print("AFK Sysyem By LeTmE");
  18. print("----------------------------------\n");
  19. }
  20.  
  21.  
  22. public OnPlayerCommandText(playerid, cmdtext[])
  23. {
  24.  
  25. if (strcmp("/AFK", cmdtext, true, 10) == 0){
  26. new string[46];
  27. format(string,sizeof(string),"[LeTmE] AFK נכנס למצב %s השחקן",GetName(playerid));
  28. SendClientMessageToAll(orange,string),TogglePlayerControllable(playerid,0),InAFK[playerid]=1,SendClientMessage(playerid,COLOR_YELLOW,"[LeTmE] AFK נכנסתה למצב");
  29. LeTmE[playerid] = Create3DTextLabel("AFK השחקן נמצא במצב",COLOR_WHITE,30.0,40.0,50.0,40.0,0),Attach3DTextLabelToPlayer(LeTmE[playerid], playerid, 0.0, 0.0, 0.7),GameTextForPlayer(playerid,"AFK ~G~On",2000,0);
  30. return 1;
  31. }
  32. if (strcmp("/UnAFK", cmdtext, true, 10) == 0){
  33. new string[46];
  34. format(string,sizeof(string),"[LeTmE] AFK יצא ממצב %s השחקן",GetName(playerid));
  35. Delete3DTextLabel(Text3D:LeTmE[playerid]),SendClientMessageToAll(orange,string),TogglePlayerControllable(playerid,1),InAFK[playerid]=0,SendClientMessage(playerid,COLOR_YELLOW,"[LeTmE] AFK יצאתה ממצב"),GameTextForPlayer(playerid,"AFK ~R~Off",2000,0);
  36. return 1;
  37. }
  38. if(InAFK[playerid] == 1)return SendClientMessage(playerid,COLOR_RED, "[LeTmE] AFK אינך יכול לבצע פקודות במצב");
  39. return 0;
  40. }
  41. stock GetName(playerid) { new name[24]; GetPlayerName(playerid,name,24); return name; }
Advertisement
Add Comment
Please, Sign In to add comment