SA-MP Forums Archive
Why i can't add the actor to interior ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Why i can't add the actor to interior ? (/showthread.php?tid=637804)



Why i can't add the actor to interior ? - Caonguyenvu2015 - 21.07.2017

Hello guy , i want to add the actor to the interior , but when i just add this code
Код:
Job_Actors[0] = CreateActor(155, 374.3732,	-117.2786,	1001.4995,	188.7063);
	SetActorFacingAngle(Job_Actors[0], 188.7063);
	SetActorVirtualWorld(Job_Actors[0], 0);
	SetActorHealth(Job_Actors[0], 99999.000000);
But when i go to the game , and use the command : /gotoco [ xyz ] , i see the actor , but , when i set this intierior of the biz , when i enter the door , the actor is going , and i can't find where is my actor , help me please guy @@


Re: Why i can't add the actor to interior ? - Logic_ - 21.07.2017

Use Streamer and Dynamic Actor function.


Re: Why i can't add the actor to interior ? - AD07 - 21.07.2017

i'd recommend you to choose the dynamic actor function with the help of streamer, but if u want to do it with this
then,
Код:
Job_Actors[0] = CreateActor(155,    374.3732,	   -117.2786,   1001.4995,   188.7063);
	//SetActorFacingAngle(Job_Actors[0], 188.7063); not needed since the 5th parameter above is actor angle
	SetActorVirtualWorld(Job_Actors[0], 0);
       SetActorInvulnerable( Job_Actors[0] , true); //better than setting health to 9999
if you still have some problems, please check your virtual world and the co-ordinates that you are entering for the actor to spawn at.
(tbh no changes were made to your code , just improved it a bit)