NPC keeps respawning
#1

I have an NPC setup in an interior, it is supposed to just stand there and do nothing.

It stays for 5-10 seconds, respawns, and the process repeats.

Quote:

//
//

#include <a_npc>

//------------------------------------------

main(){}

//------------------------------------------

NextPlayback()
{
StartRecordingPlayback(PLAYER_RECORDING_TYPE_ONFOO T,"dmv1");
}

//------------------------------------------

public OnRecordingPlaybackEnd()
{
NextPlayback();
}

//------------------------------------------

public OnNPCSpawn()
{
NextPlayback();
}

//------------------------------------------

public OnNPCExitVehicle()
{
StopRecordingPlayback();
}

//------------------------------------------

Reply
#2

use this instead
pawn Код:
#define RECORDING "RECORDINGNAME"
#define RECORDING_TYPE 2 //1 for in vehicle and 2 for on foot.

#include <a_npc>
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCExitVehicle() StopRecordingPlayback();
Reply
#3

Still does the same thing.

Disappears for a split second, then spawns and it repeats.
Reply
#4

then you recorded it wrong
Reply
#5

I just did, /ofrecord dmv1 and /stoprecord.

There are no actions or anything, hes just supposed to stand there.
Reply
#6

Quote:
Originally Posted by Josh!
I just did, /ofrecord dmv1 and /stoprecord.

There are no actions or anything, hes just supposed to stand there.
I'm not in the record stuff but maybe you recorded him only 10 seconds? Ever thought of he's maybe respawning because the record is over?
Reply
#7

What do you have in the OnPlayerSpawn at your Gamemode? add this after OnPlayerSpawn
pawn Код:
if(IsPlayerNPC(playerid)) return 1;
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)