NPC Facing Angle.
#1

Hello, I have a problem... I don't know why my NPC wont face the angle what I am telling him to face at, when I check NPC angle ingame, it says it's correct, but he doesnt face at the correct angle...

Code:
pawn Код:
// Under ongamemodeinit:
ConnectNPC("Pizza", "npcidle");

// Under onplayerspawn:
new NPCID = GetPlayerIDFromName("Pizza");
SetPlayerColor(NPCID,invalid);
SetSpawnInfo( NPCID, 0, 155, 375.6206, -117.2704, 1001.4922, 180, 0, 0, 0, 0, 0, 0 );
SetPlayerVirtualWorld(NPCID,0);
SetTimer("NPCinfo", 1000, false);

// Under NPCinfo:
new NPCID = GetPlayerIDFromName("Pizza");
SetPlayerSkin(NPCID,155);
SetPlayerPos(NPCID,375.6206, -117.2704, 1001.4922);
SetPlayerFacingAngle(NPCID,180);

// GetPlayerIDFromName works fine.
Reply
#2

I have an idea, try to use SetMyFacingAngle(https://sampwiki.blast.hk/wiki/NPC:SetMyFacingAngle) under https://sampwiki.blast.hk/wiki/NPC:OnNPCSpawn in "npcidle" pawn.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)