NPC keeps respawning - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: NPC keeps respawning (
/showthread.php?tid=104524)
NPC keeps respawning -
Josh! - 25.10.2009
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();
}
//------------------------------------------
|
Re: NPC keeps respawning -
V1ceC1ty - 25.10.2009
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();
Re: NPC keeps respawning -
Josh! - 25.10.2009
Still does the same thing.
Disappears for a split second, then spawns and it repeats.
Re: NPC keeps respawning -
V1ceC1ty - 25.10.2009
then you recorded it wrong
Re: NPC keeps respawning -
Josh! - 25.10.2009
I just did, /ofrecord dmv1 and /stoprecord.
There are no actions or anything, hes just supposed to stand there.
Re: NPC keeps respawning -
J.W. - 25.10.2009
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?
Re: NPC keeps respawning -
Dark_Kostas - 25.10.2009
What do you have in the OnPlayerSpawn at your Gamemode? add this after OnPlayerSpawn
pawn Код:
if(IsPlayerNPC(playerid)) return 1;