16.01.2016, 17:42
When i create actors they are created like in the picture,but when i i use the command which re create them it works fine
SetPlayerVirtualWorld(playerid,3);
Robber1 = CreateActor(227,1887.2599,-2364.5789,13.5391,215.3990);
Robber2 = CreateActor(61,1888.8770,-2366.2468,13.5391,50.2707);
ApplyActorAnimation(Robber1, "PED", "IDLE_CHAT", 1.800001, 1, 1, 1, 1, 13000);
ApplyActorAnimation(Robber2, "PED", "IDLE_CHAT", 1.800001, 1, 1, 1, 1, 13000);
RobberPlane = CreateVehicle(519,1881.2903,-2364.6726,14.4760,231.6925,1,1,1000);
HeistCar = CreateVehicle(411,2488.4846,-1682.3033,13.0745,87.3089,0,0,1000);
HeistCP = SetPlayerRaceCheckpoint(playerid, 2,1961.3497,-2175.5864,13.5223, 0.0,0.0,0.0, 5.0);
SetVehicleVirtualWorld(RobberPlane,3);
SetVehicleVirtualWorld(HeistCar,3);
SetActorVirtualWorld(Robber1, 3);
SetActorVirtualWorld(Robber2, 3);
SetActorInvulnerable(Robber1, false);
SetActorInvulnerable(Robber2, false);
SetActorHealth(Robber1,50);
SetActorHealth(Robber2,50);
gokill[playerid] =1;
ApplyActorAnimation(Robber1, "PED", "IDLE_CHAT", 1.800001, 1, 1, 1, 1, 13000);
ApplyActorAnimation(Robber2, "PED", "IDLE_CHAT", 1.800001, 1, 1, 1, 1, 13000);
ApplyActorAnimation(Robber1, "PED", "IDLE_CHAT", 1.800001, 1, 0, 0, 1, 13000);
ApplyActorAnimation(Robber2, "PED", "IDLE_CHAT", 1.800001, 1, 0, 0, 1, 13000);
Then try to change the applyanimation variable as I told you above and see if it works out without making the command again
|
public OnPlayerUpdate(playerid)
{
new Float:X,Float:Y,Float:Z;
for(new i = 0; i < MAX_ACTORS; i ++)
{
GetActorPos(i,X,Y,Z);
if(IsPlayerInRangeOfPoint(playerid,5.0,X,Y,Z))
{
ResyncActor(i);
}
}
return 1;
}