Advertisement
Guest User

Untitled

a guest
Feb 26th, 2012
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define yellow 0xFFFF00AA
  4. #define COLOR_YELLOW 0xFFFF00AA
  5.  
  6. new Text3D:label[MAX_PLAYERS];
  7.  
  8.  
  9. public OnFilterScriptInit()
  10. {
  11. print("\n--------------------------------------");
  12. print(" Afk SYSTEM by ChuckSkill");
  13. print("--------------------------------------\n");
  14. return 1;
  15. }
  16.  
  17. public OnPlayerCommandText(playerid, cmdtext[])
  18. {
  19. if(strcmp("/afk", cmdtext, true) == 0)
  20. {
  21. SendClientMessage(playerid, COLOR_YELLOW, "Ti si sad AFK ako zelis da se vratis nazad kucaj /back");
  22. TogglePlayerControllable(playerid,0);
  23. label[playerid] = Create3DTextLabel("AFK",yellow,30.0,40.0,50.0,40.0,0);
  24. Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
  25. new string3[70];
  26. new name[MAX_PLAYER_NAME];
  27. GetPlayerName(playerid, name, sizeof(name));
  28.  
  29. format(string3, sizeof(string3), "%s je daleko od tastature!", name);
  30. SendClientMessageToAll(COLOR_YELLOW, string3);
  31. }
  32.  
  33. if(strcmp("/back", cmdtext, true) == 0)
  34. {
  35. SendClientMessage(playerid, COLOR_YELLOW, "DOBRODOSAO NAZAD!");
  36. TogglePlayerControllable(playerid,1);
  37. new string3[70];
  38. new name[MAX_PLAYER_NAME];
  39. GetPlayerName(playerid, name, sizeof(name));
  40.  
  41. format(string3, sizeof(string3), "%s is now Back!", name);
  42. SendClientMessageToAll(COLOR_YELLOW, string3);
  43. Delete3DTextLabel(Text3D:label[playerid]);
  44. return 1;
  45. }
  46. return 0;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement