[NPC] Problem with bot it freezes at spawn
#1

Ok i've done the whole turtorial of kye, creating NPC's, and it said to solve this problem i had to look back at the onplayerspawn part, but since that isn't in my script, 'cause it's an ON FOOT NPC and not in a vehicle (so i can skip that step) still i can't figure out why my NPC doesn't do anything ingame, it joins the game and keeps standing (freezed) at the spawnplace.

Folder: server/gamemodes
I'm using the standard gamemode, that comes with 0.3 ( Bare.amx) and edited the NPC in it, here's the gamemode:
http://pastebin.com/m66c540de

Folder: server/npcmodes
My "mini" script for the NPC is called samptest1A
and here's it's code:
Код:
#define RECORDING "samptest1" //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
FOLDER: server/npcmodes/Recordings
The recording is called: samptest1
and it's file is here:



Please test if it works at your server,
and i hope anyone can help me fix it!
Reply
#2

had that problem too, try to check the names of ConnectNPC, #define RECORDING and all that what including the names.
Reply
#3

Happening to me too, ever since RC9
Reply
#4

i just want to point out your script says "samptest2" yet you've uploaded a file samptest1 and just use this as your mini script for the npc if it is just walking.

Код:
//
//

#include <a_npc>

//------------------------------------------

main(){}

//------------------------------------------

NextPlayback()
{
  StartRecordingPlayback(PLAYER_RECORDING_TYPE_ONFOOT,"samptest2");
}

//------------------------------------------

public OnRecordingPlaybackEnd()
{
  NextPlayback();
}

//------------------------------------------

public OnNPCSpawn()
{
  NextPlayback();
}

//------------------------------------------

public OnNPCExitVehicle()
{
  StopRecordingPlayback();
}

//------------------------------------------
Reply
#5

Quote:
Originally Posted by Beaver07
i just want to point out your script says "samptest2" yet you've uploaded a file samptest1 and just use this as your mini script for the npc if it is just walking.

Код:
//
//

#include <a_npc>

//------------------------------------------

main(){}

//------------------------------------------

NextPlayback()
{
  StartRecordingPlayback(PLAYER_RECORDING_TYPE_ONFOOT,"samptest2");
}

//------------------------------------------

public OnRecordingPlaybackEnd()
{
  NextPlayback();
}

//------------------------------------------

public OnNPCSpawn()
{
  NextPlayback();
}

//------------------------------------------

public OnNPCExitVehicle()
{
  StopRecordingPlayback();
}

//------------------------------------------
oh yeah :P thanks,
but there's not really a big difference (both have same problems) but samptest2 has no animations in it, just running
samptest1 has alot of animations... (some tests i did, looked how the bot would do the animations, but as my bot didn't worked couldn't check the anims yet) and i'll try your NPCmode

@ gemadon, really only since rc9 that's interesting!
Reply
#6

Please note that recordings recorded before RC7 wont work directly! Check the 0.3 topic to see what I mean.
Reply
#7

my recordings work fine since the change
Reply
#8

They will just timeout if the bots are old, then you can reload it and it should work. But his problem is that the player "stay" at the spawnpoint.
Reply
#9

well if it just stays at the spawn point it's either not loading the recording or his recording doesnt work.
Reply
#10

1rst of all try to make FS than make sure NPC goes right if not see what u have forgot (just donload others NPC and look in yhere and look in ur own what u have made wRONG

BUT DONT EDIT OTHERS NPC !! :@
NUB STYLE
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)