Actors drop out of interior?
#1

Some players report me that the actors from business'es drop out of interiors..

How the hell i fix this ?

Reply
#2

There's really no straightforward way. This is caused by the player's network and/or computer being too slow. The actors are rendered before the interior is rendered and thus the actors fall down. But since actors are controlled by the individual clients you can't reset them.

One not particularly good solution is to spawn the actors on a timer as the player enters an interior. However that means also destroying the actor when the player leaves the interior. Keep in mind that this will be rather heavy on your server resources if you have a lot of actors and a lot of players entering and exiting interior.
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
he actors are rendered before the interior is rendered and thus the actors fall down. /
If this is true (I don't doubt you, haven't tried scripting actors yet) this could work... If there isn't a way to ToggleActorControllable :P

pawn Код:
public OnActorStreamIn(actorid, forplayerid)
{
    new Float:pos[3];
    GetActorPos(actorid,pos[0],pos[1],pos[2]);
    if(floatcmp(pos[0],actorpos[0]) || floatcmp(pos[1],actorpos[1]) || floatcmp(pos[2],actorpos[2]))
    {
        SetActorPos(actorid,actorpos[0],actorpos[1],actorpos[2]);
        SetActorFacingAngle(actorid,actorpos[3]);
    }
    return 1;
}
Edit and corrected some...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)