25.06.2018, 17:46
Ok so I've finally got the Actors down. Atleast more than alot of the confusion I see going on with them. I got it to spawn at first, and so on. But now when I try to fix it's spawn location (unless I log in infront of it, it spawns in the middle of the alley), it doesn't even appear anymore, at all. Is there something I'm missing here?
pawn Код:
forward IsPlayerInRangeOfActor(playerid);
public IsPlayerInRangeOfActor(playerid)//This Works
{
if(IsPlayerInRangeOfPoint(playerid, 1.5, 2397.78, -1468.79, 24.00))
{
SendClientMessage(playerid, COLOR_RED, "Success!");
return 1;
}
return 1;
}
forward SpawnActor();
public SpawnActor()//This worked originally
{
myActor = CreateActor(120, 2397.78, -1468.79, 24.00, 182.42);
//ApplyActorAnimation(myActor,"GANGS","leanIDLE",4.1,1,0,0,0,0);
return 1;
}
public OnActorStreamIn(actorid, forplayerid)//I added more here to try and fix the issue with the Actor, now it won't even appear
{
SpawnActor();//I figured I'd try to force spawn it, yeah that definitely didn't pan out well
SetActorPos(myActor, 2397.78, -1468.79, 24.00);
SetActorFacingAngle(myActor,182.42);
SetActorVirtualWorld(myActor, 0);
SetActorInvulnerable(myActor, true);
ApplyActorAnimation(myActor,"GANGS","leanIDLE",4.1,1,0,0,0,0);//Hopefully this fixes the bug with the actors
return 1;
}