NPC spawns somewhere under the map.
#1

NPC does not go where it must go. If i /goto him then I will be teleported to cords 0 0 0 (near blueberry farm). Everything is bypassed.

Код:
public OnPlayerRequestSpawn(playerid)
{
	if(!IsPlayerConnected(playerid)) return 0;
	if(IsPlayerNPC(playerid)) return 1;
Код:
Код:
public OnPlayerRequestClass(playerid, classid)
{
	if(!IsPlayerConnected(playerid)) return 0;
	if(IsPlayerNPC(playerid))
OnPlayerSpawn I've defined what skin it must have. Any ideas what makes bot to it's right place ?
Reply
#2

Do you use SetPlayerPos on your NPC?
Reply
#3

No, MyOnPlayerSpawn is this:
Код:
if(IsPlayerNPC(playerid))
	{
		new playername[64];
		GetPlayerName(playerid,playername,64);

	 	if(!strcmp(playername,"Annika",true))
	 	{
	    SetPlayerSkin(playerid, 193);
	    SetPlayerInterior(playerid, 10);
        SetPlayerVirtualWorld(playerid, -1);
	    return 1;
		}
Reply
#4

Have you recorded any NPC movement and use it?
Reply
#5

Yep, just half an hour ago i recorded standing bot in local server, in 24/7 interior.
Reply
#6

You don't need to record a standing bot. Just use SetPlayerPos on it and it will stand in one place.
Reply
#7

Okay, I try it. But sooner or later I need to create moving bot. So I have still problem.
Reply
#8

Make sure the .rec file and NPC script are in right folders and you're using correct file names in your script.
Reply
#9

I added playerpos, and angle but still sama problem. I checked my npc script and recording file, all matches..
Reply
#10

Can you show your NPC script?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)