NPC Bot
#1

Hello guys, I'm trying to make a npc bot. Ok, so my npc connects to server, but I can't see it.

Gamemode:
Код:
new NPC1;
OnGameModeInit()
{
NPC1 = ConnectNPC("Bikez", "bike");
return 1;
}
bike file in npcmodes:
Код:
#define RECORDING "NPCBOT1" 
#define RECORDING_TYPE 2
 
#include <a_npc>

public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
Reply
#2

Don't you get an error when you compile your gamemode?
Reply
#3

Quote:
Originally Posted by Twizted
Посмотреть сообщение
Don't you get an error when you compile your gamemode?
Nope, I have registration system in my gamemode, is it stops the bot?
Reply
#4

Yes, your register system could be stopping the NPC from spawning.

Put this before you show the register dialog or w/e your system uses:

pawn Код:
if(IsPlayerNPC(playerid)) return 1;
Check this: https://sampforum.blast.hk/showthread.php?tid=95034

Read under "Common Problems"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)