Creating npc
#1

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

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);
}
Reply
#3

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.
Reply
#4

How can i make it visible inside Interiors?
Reply
#5

Bump?
Reply
#6

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

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?
Reply
#8

Bump
Reply
#9

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?
Reply
#10

Yes Mecent, you're correct.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)