01.12.2013, 13:06
i created an npc witout rec file, i seted skin and pos, skin has changed, but position isin't, why?
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;
}
else if( !IsPlayerNPC( playerid ) )
{
its SetMyPos for NPC's there is totally different functions i think.. look on wiki
https://sampwiki.blast.hk/wiki/NPC:SetMyPos |
Have you tried doing an on-foot recording for the NPC at the location that you want it to stand, and then run that recording through ConnectNPC? If you do that, it will automatically teleport to the place that you were standing at during the recording, rather than you having to use SetPlayerPos.
|