NPC Bot - 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)
+--- Thread: NPC Bot (
/showthread.php?tid=474890)
NPC Bot -
Creig - 10.11.2013
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);
Re: NPC Bot -
Twizted - 10.11.2013
Don't you get an error when you compile your gamemode?
Re: NPC Bot -
Creig - 10.11.2013
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?
Re: NPC Bot -
-Prodigy- - 10.11.2013
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"