standing npc
#1

hello,npc-How do I set up so that only stand still in one place?

This method does not work:
Code:
#include <a_samp>

public OnFilterScriptInit()
{
       ConnectNPC("BOT_TESZT1", "BOT_TESZT1");
       return 1;
}
public OnPlayerSpawn(playerid)
{
       if(IsPlayerNPC(playerid))
       {
            new npcname [MAX_PLAYER_NAME];
            GetPlayerName(playerid, npcname, sizeof(npcname));
            if(!strcmp(npcname, "BOT_TESZT1", true))
            {
                        SetPlayerSkin(playerid,100);
                        SetPlayerPos(playerid, 2105.4880,-1806.4983,13.5547);
            }
            return 1;
      }
       return 1;
}
Code:
#include <a_npc>

public OnRecordingPlaybackEnd()
{
}

public OnNPCSpawn()
{
}

public OnNPCExitVehicle()
{
}
I did everything as it should be, but it is not good, help!
Reply
#2

Quote:
Originally Posted by Slicebook
View Post
I did everything as it should be, but it is not good, help!
Everything?

pawn Code:
StartRecordingPlayback(2, "idle");
Reply
#3

You don't need recording playbacks for idle NPCs. Speaking from experience. However, you will need to allow them through your registration process. Add IsPlayerNPC in places where it might get stuck.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)