NPC Issue.
#1

I recorded an NPC that stands still, recording named "GateGuard".

I moved that file to npcmodes\recordings

Made a pawno script in npcmodes directory with only the following:

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

#include <a_npc>
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);

#if RECORDING_TYPE == 1
  public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
  public OnNPCExitVehicle() StopRecordingPlayback();
#else
  public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
And I added this in my gamemode:

pawn Code:
public OnGameModeInit()
{
    // General
   
    blabla
   
   
    // NPCs
   
    ConnectNPC("Sergeant_Wyatt","GateGuard");
And I put

pawn Code:
if(IsPlayerNPC(playerid)) return 1;
under OnPlayerConnect, OnPlayerRequestClass, OnPlayerRequestSpawn, OnPlayerSpawn.

Still, my NPC does not show up. The server log says:



And the server appears empty.

Any help please? I followed this tutorial: https://sampforum.blast.hk/showthread.php?tid=95034 - I don't wanna bump that, however.
Reply
#2

If bot joins he takes one slot
Example:
If you have 100 slots server and you add one bot then your slots would be 0/99
Reply
#3

Quote:
Originally Posted by mmrk
View Post
If bot joins he takes one slot
Example:
If you have 100 slots server and you add one bot then your slots would be 0/99
Well, my server is set to 3 slots. That would make it 2. But it stays at 3. In other words, the bot can't connect, or what?

Here's my server.cfg if that helps:

Code:
echo Executing Server Config...
lanmode 1
rcon_password -Edited out-
maxplayers 3
port 7777
hostname Test
gamemode0 CSRP 1
filterscripts
plugins streamer
announce 0
query 1
weburl smouch.net/lol
Reply
#4

I fixed it never mind. :P

I forgot
Code:
maxnpc 20
In server.cfg.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)