Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 2.50 KB  |  hits: 8  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public Postos()
  2. {
  3. for(new i=0; i<MAX_PLAYERS; i++){
  4. if(IsPlayerConnected(i)) {
  5. if(PlayerToPoint(7.0, i, 70.4532,1219.1954,18.8117) || PlayerToPoint(7.0, i, -90.2719,-1169.9579,2.3964) || PlayerToPoint(7.0, i, -2411.5728,976.1896,45.4609) || PlayerToPoint(7.0, i, 2114.8413,919.9194,10.8203)){//Fort Carson
  6. GameTextForPlayer(i," ~n~ ~w~Posto ~y~Petobras ~r~/abastecer",3000,4);
  7. AreaPosto[i] = 1;
  8. } else {
  9. if(AreaPosto[i] == 1){
  10. AreaPosto[i] = 0;
  11. }
  12. if (PlayerToPoint(7.0, i, 2638.9553,1107.1788,10.8203) || PlayerToPoint(7.0, i, 1595.6233,2199.6162,10.8203) || PlayerToPoint(7.0, i, 1940.8671,-1773.2283,13.3906) || PlayerToPoint(5.0, i, -2243.8435,-2560.5598,31.9219)){//Posto LV
  13. GameTextForPlayer(i," ~n~ ~w~Posto ~y~Shell ~r~/abastecer",3000,4);
  14. AreaPosto[i] = 1;
  15. } else {
  16. if(AreaPosto[i] == 1){
  17. AreaPosto[i] = 0;
  18. }
  19. if (PlayerToPoint(7.0, i, 1382.3647,459.0785,20.3452) || PlayerToPoint(8.0, i, -1675.4781,413.1594,7.1797) || PlayerToPoint(7.0, i, 655.5922,-565.3943,16.3359) || PlayerToPoint(7.0, i, -1606.3616,-2713.5872,48.5335)){//Posto LS/SF
  20. GameTextForPlayer(i," ~n~ ~w~Posto ~y~Ipiranga ~r~/abastecer",3000,4);
  21. AreaPosto[i] = 1;
  22. } else {
  23. if(AreaPosto[i] == 1){
  24. AreaPosto[i] = 0;
  25. }
  26. if(IsPlayerInPlace(i,576.3771, 1662.789, 619.3304, 1709.206) || PlayerToPoint(7.0, i, 1004.1403,-937.8801,42.1797) || PlayerToPoint(7.0, i, 2202.1230,2476.8582,10.8203) || PlayerToPoint(6.0, i, 417.2369,-1912.7708,1.5641)){//Posto acima FC
  27. GameTextForPlayer(i," ~n~ ~w~Posto ~y~Texaco ~r~/abastecer",3000,4);
  28. AreaPosto[i] = 1;
  29. } else {
  30. if(AreaPosto[i] == 1){
  31. AreaPosto[i] = 0;
  32. }
  33. new string[128];
  34. GetPlayerPos(i, PlayerCurrentPos[0], PlayerCurrentPos[1], PlayerCurrentPos[2]);
  35. if(!floatcmp(PlayerCurrentPos[0], PlayerLastPos[i][LastX]) && !floatcmp(PlayerCurrentPos[1], PlayerLastPos[i][LastY]))
  36. {
  37. PlayerAfkTicks[i] ++;
  38. }
  39. else
  40. {
  41. PlayerAfkTicks[i] = 0;
  42. }
  43. PlayerLastPos[i][LastX] = PlayerCurrentPos[0];
  44. PlayerLastPos[i][LastY] = PlayerCurrentPos[1];
  45. PlayerLastPos[i][LastZ] = PlayerCurrentPos[2];
  46.  
  47. if(PlayerAfkTicks[i] == MAX_IDLE_TIME*300)
  48. {
  49. AFK[i]= 1;
  50. GetPlayerName(i, playername, MAX_PLAYER_NAME);
  51. format(string, sizeof(string), "| ANTI - AFK | %s foi bloqueado de upar, por ficar ausente por muito tempo!", playername);
  52. SendClientMessage(i, 0x930093AA, string);
  53. SetCameraBehindPlayer(i);
  54. TogglePlayerControllable(i,0);
  55. KillTimer(timer12[i]);
  56. TextDrawShowForPlayer(i,AfkText);
  57. TextDrawShowForPlayer(i,AfkBackText);
  58. TextDrawShowForPlayer(i,topblack);
  59. TextDrawShowForPlayer(i,bottomblack);
  60. }
  61. }
  62. }
  63. }
  64. }
  65. }
  66. }
  67. }