SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Thread Tools Display Modes
Old 25/03/2020, 03:13 PM   #1
jasperschellekens's Avatar
Join Date: Dec 2016
Location: Holland
Posts: 1,014
Reputation: 92
Default Make a NPC face a player RNPC

I've been struggling with this for a while now.
What I want to do is that the NPC turns around and face the player while the player interacts with it but that simply doesn't happen. It just pauses the npc but never turns it around.
This is the code I am using:

PHP Code:
new Float:angle;
NpcCurrentPathActive[i] = -1;
CurrentPlayerNPC[playerid] = i;
CurrentPlayerNpcDialog[playerid] = 1;
angle +=180.0;
angle 360.0angle -= 360.0;
I've made a GIF to help you to see to understand what's happening.

As you can see, the NPC stops walking... But it never turns around.

Any help would be appreciated
Coming soon (6-1-2020):

Undead Wasteland Roleplay - The year is 1996. San Andreas is a wasteland ruled by the undead. the once so glorius landscape of San Andreas, is now a shattered decayed place that is only a vague memory of the world as we used to know it.
Official Live Beta Release Date: 1st of June, 2020
Discord - Website
jasperschellekens is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Make player face their camera vector Beckett Scripting Help 3 09/03/2020 02:46 PM
Make a player face another player Extremo Scripting Help 3 11/06/2012 05:15 PM
Player Face Look At??? Possible?? vakhtang Help Archive 5 19/01/2011 09:11 AM
Make players face each other: PlayerFacePlayer(..) ? Alec24 Help Archive 1 19/03/2010 09:14 PM

All times are GMT. The time now is 09:12 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.