NPC On Foot Problem
#1

This is the only thing i added for NPC on foot.

This is mine "mini" script that make connection with the security.rec file
pawn Код:
#define RECORDING "security" //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 this on:
pawn Код:
public OnGameModeInit()

  ConnectNPC("Jim_Caziel","security");
  return 1;
}
The NPC On Foot connects but doesn't show up IG.
Reply
#2

this is my onfoot bot he spawns just fine

Код:
#include <a_npc>

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

main(){}

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

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

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

public OnRecordingPlaybackEnd()
{
  NextPlayback();
}

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

public OnNPCSpawn()
{
  NextPlayback();
}

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

public OnNPCExitVehicle()
{
  StopRecordingPlayback();
}
Reply
#3

Can you show me all your NPC On Foot Stuff?
Reply
#4

If that's on foot,Isn't it supposed to be
pawn Код:
#if RECORDING_TYPE == 2
?
Reply
#5

Quote:
Originally Posted by ►ϻozilla Fir3foж◄
If that's on foot,Isn't it supposed to be
pawn Код:
#if RECORDING_TYPE == 2
?
Dunno, i think it is just needed on here:
pawn Код:
#define RECORDING_TYPE 2 //1 for in vehicle and 2 for on foot.
Reply
#6

Quote:
Originally Posted by RoamPT
Quote:
Originally Posted by ►ϻozilla Fir3foж◄
If that's on foot,Isn't it supposed to be
pawn Код:
#if RECORDING_TYPE == 2
?
Dunno, i think it is just needed on here:
pawn Код:
#define RECORDING_TYPE 2 //1 for in vehicle and 2 for on foot.
Try?
And why you have OnNPCEnterVehicle If you want it to be On foot? O_o
Reply
#7

God i am doing as explained on the tutorial, but that doesn't work. Beaver07 show me yours, to see what am i doing wrong.
Reply
#8

the bot in the turtorial is in a vehicle recorded so it needs the vehicle, if it's on foot it doesn't need the vehicle.
also the problem could be your bot gets stopped by a Adminscript! (it needs to login which a bot can't do)
Check at the turtorial how to solve this (at bottom of turtorial)

Also i have the problem that is spawns but it doesn't move (It's on foot!!)
Reply
#9

<try make a new .record file that fixed my last problem :P:S
Reply
#10

Ok This is my NPC Mode Tollbooth it's just a guy that stands there

Код:
#include <a_npc>

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

main(){}

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

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

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

public OnRecordingPlaybackEnd()
{
  NextPlayback();
}

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

public OnNPCSpawn()
{
  NextPlayback();
}

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

public OnNPCExitVehicle()
{
  StopRecordingPlayback();
}
it's simple as. If the npc is to walk you make a recording of it walking
just make sure that you are calling the recording when it spawns ^^
that's all i use for my bot to spawn and position it's self at the right spot
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)