Jump to content

Drakath

Members
  • Posts

    768
  • Joined

  • Last visited

Everything posted by Drakath

  1. Well, as much as I tried to get it back to sync, it didn't work. They change their position and get desynced again so the best solution I found is using destroyElement for every unsynced ped.
  2. "zone" is not specified. local zone = getZoneName(x, y, z)
  3. Add an event onElementZoneChange. It should trigger when an element enters a different zone. GTA San Andreas has this by default, when you enter a new zone, it outputs the name of the new zone. Parameters: oldZone, newZone, oldCity, newCity
  4. You could try making a col shape and make your script check if player is in that col shape.
  5. I don't really care where is their actual position. I just want them to take damage.
  6. That's what I did with addEvent( "456", true ) function updatePosition(ped) if not getElementSyncer(ped) then local x, y, z = getElementPosition(ped) setElementPosition(ped, x+2, y+2, z+2) end end addEventHandler ( "456", getRootElement(), updatePosition ) If I update their position every time they move then it just keeps setting the same position making them not able to move at all. onClientPedDamage sounds more efficient but I'm not sure how should I do it. Should I trigger "456" event every time a ped takes damage or should I setElementSyncer every time a ped takes damage?
  7. They weren't too far away, they were just about 30 meters away. Anyway, how can I keep them visible in their true position?
  8. I tried it in two ways. I can see that script changes their position but they somehow lose the syncer instantly and become immortal again. Here are the ways I tried: addEvent( "456", true ) function updatePosition(ped) if not getElementSyncer(ped) then local x, y, z = getElementPosition(ped) setElementPosition(ped, x+2, y+2, z+2) end end addEventHandler ( "456", getRootElement(), updatePosition ) addEvent( "123", true ) function updateSyncer(ped, target) setElementSyncer ( ped, target ) end addEventHandler ( "123", getRootElement(), updateSyncer )
  9. Could you post the part of your script where you update their position? Are you using setElementSyncer?
  10. Sorry about the debugscript, it doesn't have anything to do with this.
  11. Drakath

    Event

    No, it's not. If you are talking about onClientPlayerWeaponFire, when throwing grenades it will not detect vehicle as a hitElement most of the time, unless it would be aimed very correctly.
  12. I have a zombie script and one bug really annoys me. Sometimes pedestrians gets desynchronized and you can't kill them. Is there any workaround for this?
  13. Drakath

    bone_attach

    Thanks, Solidsnake14
  14. Drakath

    bone_attach

    I'm using the bone_attach resource and I keep getting errors since MTA 1.4: WARNING: bone_attach\bone_attach_c.lua:79: Bad argument @ 'setElementPosition' [Expected number, got NaN] WARNING: bone_attach\bone_attach_c.lua:80: Bad argument @ 'setElementRotation' [Expected number, got NaN] I did this but it still gives me the errors. if tonumber(objx) and tonumber(objy) and tonumber(objz) and tonumber(offrx) and tonumber(offry) and tonumber(offrz) then setElementPosition(element,objx,objy,objz) setElementRotation(element,offrx,offry,offrz,"ZXY") end
  15. Drakath

    Event

    Attacker is player, not projectile. And I think it would be even better to add onElementHitByProjectile
  16. Drakath

    Projectiles

    Never mind, I figured out that projectiles can only be created by local player.
  17. Wow, that's a really long changelog. Good job!
  18. Drakath

    Projectiles

    I made a pedestrian shoot rocket projectiles but those projectiles don't explode. They just disappear when they touch something. What should I do?
  19. Where can I report a bug? I can't find "Report issue" page on the Mantis page.
  20. Never mind, I found a way to fix this.
  21. I don't want to use it. Just tell me how to fix it.
  22. I have encountered a strange problem. I gave a minigun to a ped: giveWeapon(myPed, 38, 9999, true) And when I tried to make him shoot using setPedControlState he just shot a few bullets and then it looked like he ran out of ammo even though I gave him 9999. I also tried it with a rocket launcher but I only saw him do a shooting animation, no rockets were actually launched. Is this some sort of bug? Is it possible to fix it by scripting?
  23. Drakath

    Colshape

    Can someone help me to retrieve ONE random player who is in a colshape?
  24. Is there any way to reload your mtaserver.conf without restarting the Server?
×
×
  • Create New...