SA-MP Forums Archive
Creating npc - 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: Creating npc (/showthread.php?tid=603681)



Creating npc - eikzdej - 26.03.2016

Hi! I've seen tutorials on how to make a npc, but my problem is how can i make a standing npc? Thanks!


Re: Creating npc - Admigo - 26.03.2016

YOu can use actors for that.
https://sampwiki.blast.hk/wiki/CreateActor
Код:
new ActorCJ;
 
public OnGameModeInit()
{
    // Create an actor (CJ) at Blueberry Acres (Center of SA map)
    ActorCJ = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
}



Re: Creating npc - AIped - 26.03.2016

If you choose to make just a standing npc just make it spawn without recordings.
however if you want the npc to just always stay at the same location i suggest using CreateActor
because that is basicly an npc (without its feautures) that doesnt take playerslots.


Re: Creating npc - eikzdej - 26.03.2016

How can i make it visible inside Interiors?


Re: Creating npc - eikzdej - 26.03.2016

Bump?


Re: Creating npc - iKevin - 26.03.2016

Quote:
Originally Posted by eikzdej
Посмотреть сообщение
Bump?
SetActorVirtualWorld


Re: Creating npc - eikzdej - 27.03.2016

Thanks! But i have another problem, if my character's last position is inside the Interior, then i log to the game, i can't see the actor immediately, i need to go outside the interior and go back again in able to see it. What should i do?


Re: Creating npc - eikzdej - 27.03.2016

Bump


Re: Creating npc - Mencent - 27.03.2016

Hi!

Did I understand this right? When you log in your game (after you disconnect & connect again) you spawn in the bank interior. But you can't see the actor, right? You have to go out and come again in the bank then you can see the actor. Is that right?


Re: Creating npc - eikzdej - 27.03.2016

Yes Mecent, you're correct.