NPC is just standing in spawn
#1

i create an NPC bot and it's not spawning in my seated place it's just standing in 0,0,0 cordinates
Reply
#2

Well, you are clearly doing something wrong setting up the NPC.

Take a look at this tutorial, worked for me when i was in need for one.
Reply
#3

i created NPC without .rec file
Reply
#4

bump
Reply
#5

In this case, which plugin or include are you using?
Reply
#6

<a_npc>
Reply
#7

If you dont create a .rec file for an NPC it will stand at 0,0,0 coords.

So after connecting him, you should apply player functions to him, SetPlayerPos/FacingAngle/Skin, etc.

You can use ApplyAnimation on him aswell.
Reply
#8

Quote:
Originally Posted by batonsa
Посмотреть сообщение
If you dont create a .rec file for an NPC it will stand at 0,0,0 coords.

So after connecting him, you should apply player functions to him, SetPlayerPos/FacingAngle/Skin, etc.

You can use ApplyAnimation on him aswell.
i apply those functions, skin is okey, but he is still standing in 0,0,0,
Reply
#9

pawn Код:
public OnPlayerSpawn(playerid)
{
    if( IsPlayerNPC( playerid ) )
    {
        new npcname[ MAX_PLAYER_NAME ];
        GetPlayerName( playerid, npcname, sizeof( npcname ) );
        if( !strcmp( npcname, "Sandra_Boveriene", true ) )
        {
            SetPlayerSkin( playerid, 141 );
            SetPlayerPos( playerid, 150.9816, -157.4454, 3.2859 );
            print( "atsspawninp" );
        }
        return true;
    }
Reply
#10

bump
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)