Connecting An NPC Past A Login System
#1

Hello, I am trying to connect an NPC to my server, it connects to the server and I try to teleport to it and it says it has not spawned yet.

Then, i went to where my NPC will appear and reset the server, the NPC connected, i could see the NPC doing its recording, But then it just leaves the server with no warning... it just says it timed out.

Please can someone help. Here is my script:

FilterScript:

Quote:

#include <a_samp>



public OnGameModeInit()
{
ConnectNPC("ammunationshooter","ammunationshooter" ); // The name of your NPC and the record. The record need to match an record with the same name. The NPC name can be anything


return 1;
}
public OnPlayerSpawn(playerid)
{
if(!IsPlayerNPC(playerid)) return 0; // If the player is not a NPC, nothing will happend
}
return 1;
}
public OnPlayerConnect(playerid)
{
return 1;
}

And in my NPCModes Folder i use this:

Quote:

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

//Mega Transport Pack By Memoryz of SA-MP Forums

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

Does anyone know what i can do to fix the problem?

Thank You.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)