NPC is just standing in spawn -
ancezas - 18.11.2013
i create an NPC bot and it's not spawning in my seated place it's just standing in 0,0,0 cordinates
Re: NPC is just standing in spawn -
batonsa - 18.11.2013
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.
Re: NPC is just standing in spawn -
ancezas - 18.11.2013
i created NPC without .rec file
Re: NPC is just standing in spawn -
ancezas - 19.11.2013
bump
Re: NPC is just standing in spawn -
batonsa - 19.11.2013
In this case, which plugin or include are you using?
Re: NPC is just standing in spawn -
ancezas - 19.11.2013
<a_npc>
Re: NPC is just standing in spawn -
batonsa - 19.11.2013
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.
Re: NPC is just standing in spawn -
ancezas - 19.11.2013
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,
Re: NPC is just standing in spawn -
ancezas - 19.11.2013
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;
}
Re: NPC is just standing in spawn -
ancezas - 20.11.2013
bump