Alexandre Makina

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

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.