Odd NPC issue
#1

I've been trying to work out some code that'll let me start and stop NPC's on command, and it's working so far. However, while the NPC's are stopped, I am trying to move them somewhere else (And their vehicles) so that they do not get in the way. The issue is, SetMyPos doesn't seem to do anything at all, and the NPC's just stay at their started record point.

What is even weirder is, when I join my own server and teleport to a location near the NPC's record point, the NPC's actually spawn at the same spawn point as me, even though I haven't given them the coordinates for that point??

Anyway yeah, basically I'm just trying to get the NPC's out of the way on the stop command. Here is my code:

Код:
#define RECORDING "intense3" //This is the filename of your recording without the extension.
#define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot.

#include <a_npc>
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnClientMessage(color, text[])
{
	if(!strcmp(text, "stopnpcs", true)) 
    {
      SetMyPos(0.0,0.0,10.0);
	  StopRecordingPlayback();
      return 1;
    }
    if(!strcmp(text, "startnpcs", true)) 
    {
	  StartRecordingPlayback(RECORDING_TYPE, RECORDING);
      return 1;
    }
return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)