Jump to content

getElementSyncer


Drakath

Recommended Posts

Posted

I quite often encounter desynced pedestrians. However today I checked them with getElementPosition and getElementSyncer and to my wonder, they had a syncer and position was correct but they were still invincible. I changed the syncer using setElementSyncer and then I was able to kill the ped.

So how come pedestrians are desynced even though they have a syncer?

Another problem is that I have a script which I put before spawning a ped so they don't spawn in radar areas:

for theKey, radar in ipairs(getElementsByType("radararea")) do 
if getElementData(radar, "noPeds") then 
if isInsideRadarArea ( radar, x, y ) then 
return end end end 

It kind of works. Normal peds don't spawn there but desynced do. Why does the spawn code get executed even though I wrote return in the script above?

Can anyone give me some tips on how to prevent desync?

Posted

Okay, also is it better to do the most controlling of a ped via server-side using setPedAnimation or via client-side using setPedControlState?

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.
×
×
  • Create New...