Jump to content

Resource issues. Maximum distance


Recommended Posts

I'm having a problem with this feature. Even altering the distance, you can see the text from anywhere on the map. How to solve? I would like the text to be seen only when it is near.

---------------------------

  1. AddEventHandler (' onClientRender ',de raiz,
  2. função ( )
  3. para _ , aVehicle na próxima , getElementsByType ( [[ veículo ]] ) fazer
  4. Se aVehicle e getElementModel ( aVehicle ) == 429 então
  5. locais APX,APY,apz= getElementPosition (localPlayer);
  6. locais AVX,avy,AvZ= getElementPosition (aVehicle);
  7. se ( getDistanceBetweenPoints3D ( APX , APY , apz , AVX , avy , AVZ ) <= 10 ) , em seguida,
  8. locais ASX,ASY= getScreenFromWorldPosition (AVX,avy,AVZ);
  9. se ( ASX e ASY ) , em seguida,
  10. dxDrawText ( tostring ( getVehiclePlateText (aVehicle)),ASX,ASY,_,_, toColor (255,0,0,255),2,'Arial',"centro","centro");
  11. fim
  12. fim
  13. fim
  14. fim
  15. fim
  16. );
Edited by Alexandre Makina
Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...