Actors disappear
#1

Hello, I have been placing actors around the map for some more RP, but sometimes they just disappear out of nowhere and when I restart the server they are back and then gone again. This doesn't happen every time just sometime out of nothing what is the cause of this ?

PHP код:
new    ActorDJ1 CreateActor(299346.0761, -1845.47067.795385.1415);
    
ApplyActorAnimation(ActorDJ1"SCRATCHING""scdldlp"4.010000); // /dj 1
    
new ActorDJ2 CreateActor(45346.0746, -1844.16037.795385.8244);
    
ApplyActorAnimation(ActorDJ2"SCRATCHING""scdrulp"4.010000); // /dj 4
    
new DancerMale1 CreateActor(29326.8049, -1851.21584.1103333.7950); // ActorDanceMale
    
ApplyActorAnimation(DancerMale1"DANCING""DAN_Loop_A"4.010000); // /getjiggy 3
    
new DancerFemale1 CreateActor(12327.3703, -1849.56524.1103160.8896); // DancerFemale1
    
ApplyActorAnimation(DancerFemale1"SCRATCHING""dnce_M_b"4.010000); // /getjiggy 7
    
new DancerMale2 CreateActor(23331.5946, -1849.9648 ,4.1103 ,60.0515); // DancerMale2
    
ApplyActorAnimation(DancerMale2"DANCING""dnce_M_d"4.010000); // /getjiggy 10
    
new DancerFemale2 CreateActor(40324.5778, -1842.9836 ,4.1103269.0233); // DancerFemale2
    
ApplyActorAnimation(DancerFemale2"STRIP""PUN_HOLLER"4.010000); // /cheer 8
    
new Cook1 CreateActor(46305.3727, -1872.33182.6476220.5824); // Cook1
    
ApplyActorAnimation(Cook1"BD_FIRE""wash_up"4.010000); // /washhands
    
new Seller1 CreateActor(40324.5778, -1842.98364.1103269.0233); // DancerFemale2
    
ApplyActorAnimation(Seller1"BAR""Barserve_loop"4.010000); // /bar 6
    
new Beachboy CreateActor(97321.0659, -1875.47562.5435174.6999); // Beachboy1
    
ApplyActorAnimation(Beachboy"BEACH""Lay_Bac_Loop"4.010000); // /sit 2
    
new Beachwomen CreateActor(140322.6432, -1875.66282.5395178.0904); // Beachwomen1
     
ApplyActorAnimation(Beachwomen"BEACH""bather"4.010000); // /lay 1 
Reply
#2

Anyone ?
Reply
#3

Does anyone can help me with this ? They also fall true custom objects
Reply
#4

There's a certain distance where actors are movable (by gravity) but the map collision isn't loaded yet at that position.

Even on the original map they sometimes just fall through the ground and respawn somewhere else or get stuck somewhere. Same for custom objects, depending on stream distance it can be even worse.


What I did is use the streamer plugin for dynamic Actors with lower stream distances (so they stream in from closer distances) and put this code into the callback OnDynamicActorStreamIn:

Код:
new Float:x, Float:y, Float:z;
Streamer_GetFloatData(STREAMER_TYPE_ACTOR, actorid, E_STREAMER_X, x);
Streamer_GetFloatData(STREAMER_TYPE_ACTOR, actorid, E_STREAMER_Y, y);
Streamer_GetFloatData(STREAMER_TYPE_ACTOR, actorid, E_STREAMER_Z, z);

SetDynamicActorPos(actorid, x, y, z);
This will update their position everytime they stream in for someone (their server-side position will not change when falling through the map).
It's not perfect and it can still happen, but it's much less likely as everytime someone gets close they get reset. So even if it happens once, they will be back at their spot later.
Reply
#5

24 hour bumps only too.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)