toribio

toribio

Apr 24th, 2009
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.85 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. new Text:Teste;
  4.  
  5. forward PosTextDraw();
  6.  
  7. public OnFilterScriptInit()
  8. {
  9.     Teste = TextDrawCreate(320.0, 200.0, "Territorio: ~g~Came-A-Lot");
  10.     TextDrawColor(Teste, 0xFFF000FF);
  11.     TextDrawAlignment(Teste, 2);
  12.     TextDrawFont(Teste, 0);
  13.     TextDrawLetterSize(Teste, 2.5, 2.5);
  14.     TextDrawUseBox(Teste, 1);
  15.     TextDrawBoxColor(Teste, 0x000000AA); //preto
  16.  
  17.     SetTimer("PosTextDraw", 1000, 1);
  18.     return 1;
  19. }
  20.  
  21. public PosTextDraw()
  22. {
  23.     for(new i; i < MAX_PLAYERS; i++)
  24.     {
  25.         new Float:pos[3];
  26.         GetPlayerPos(i, pos[0], pos[1], pos[2]);
  27.         if( pos[0] >= 2080.1418 &&  //X-
  28.             pos[1] >= 981.61050 &&  //Y-
  29.             pos[0] <= 2342.2400 &&  //X+
  30.             pos[1] <= 1185.9844)    //Y+
  31.         {
  32.             TextDrawShowForPlayer(i, Teste);
  33.         } else {
  34.             TextDrawHideForPlayer(i, Teste);
  35.         }
  36.     }
  37.     //n�o pdoemos usar "return" em um loop com players, ai s� funcionaria pro ID 0
  38. }
  39.  
Add Comment
Please, Sign In to add comment