Jump to content

DiSaMe

Helpers
  • Posts

    1,449
  • Joined

  • Last visited

  • Days Won

    32

Everything posted by DiSaMe

  1. MEd is better to use if you want to get ID of GTA SA map instance.
  2. DiSaMe

    My snow script

    It's easier for me in this way.
  3. DiSaMe

    My snow script

    Um... I think I did so much that I'm too lazy now to add annotations But somehow I managed to add them where I change UV coordinates.
  4. DiSaMe

    My snow script

    This is the editor which I will use to create snow DFF models:
  5. DiSaMe

    bindKey <_<

    Placing bindKey where the function has already been created is enough.
  6. DiSaMe

    My snow script

    My main goal is to make only visual snow, but yeah, maybe I should try that as well
  7. DiSaMe

    My snow script

    It was lagging because of snowflakes and because recording video slows down the computer a bit. The rectangle is a custom model, and to cover the whole map, I will need to make more models
  8. DiSaMe

    My snow script

    I'm going to cover the whole map with dynamic snow to make the season switch between summer and winter in my gamemode
  9. DiSaMe

    C-Bug

    Glitch only works if it's enabled by the script.
  10. DiSaMe

    Is this possible?

    To make it possible to ADD objects using custom models to the map. It's hard to believe that thousands of objects are not used. I just tried this and the results are, as long as GTA internal object and custom object are far enough from each other, original and custom models can share the same ID.
  11. DiSaMe

    Is this possible?

    Well, at least custom models aren't meant to affect internal objects, but there may be some bugs. When I replaced models with low IDs (don't know exactly, but around 1000 and less), trees in the countryside were replaced too, but when I used higher IDs, no internal objects were affected.
  12. DiSaMe

    Is this possible?

    Custom models don't affect GTA internal objects.
  13. DiSaMe

    Copy and paste works?

    In 1.0.4 it works fine, in 1.1 it doesn't, at least for me.
  14. I think it's best to use two scripts, one client-side for canceling damage and another server-side for animation.
  15. The event must be onClientPlayerDamage. Unlike ped functions, ped events don't work with players.
  16. Another way (I think it's faster): function isElementInRangeOfPoint(element,range,x,y,z) local ex,ey,ez = getElementPosition(element) ex,ey,ez = ex-x,ey-y,ez-z return ex*ex+ey*ey+ez*ez <= range*range end Copy this code to the script and you can use this function on all physical elements.
  17. It's not the center, but near the center and it does not change.
  18. getWorldFromScreenPosition and processLineOfSight can be used to get world position without clicking.
  19. setElementModel can be used not only on peds and players, but also on objects and vehicles. setPedSkin is deprecated.
  20. removeCommandHandler destroys the command, but it's much easier to use isElementWithinMarker in the function attached to the command to check if the player is in the marker and if he's not, then don't execute further actions.
  21. Something like this: local we1,wx1,wy1,wz1,e1 = processLineOfSight(sx,sy,sz,dx,dy,dz) local we2,wx2,wy2,wz2,e2 = processLineOfSight(sx,sy,sz,dnx,dny,dnz) local angle = -math.deg(math.atan2(wx1-wx2,wy1-wy2)) sx,sy,sz are source coordinates, dx,dy,dz are destination coordinates and dnx,dny,dnz are coordinates near the destination. If you get dx,dy,dz from screen (let's say pixels are sx,sy), you can get dnx,dny,dnz from the pixel which is right from the first (sx+1,sy). edit: this is for vertical surfaces. It would need some more work to get vertical angle.
  22. MTA tends to crash with custom models.
  23. I searched on SA-MP wiki and found nothing about custom animations. As SA-MP can't replace DFFs, TXDs, COLs, add water squares and change other client-side stuff, it doesn't seem like it could support custom animations.
  24. SA-MP doesn't have custom animations, does it?
×
×
  • Create New...