#1

Hello

i have made may npc and they all work,
i just added a train one, and it will not enter it
it will just say at the spawn...

i have checked the script 100 times and it all looking ok
im i doing somethink wrong or is it a bug??
Reply
#2

well have u followed kc's NPC tut?
show us your code.
Reply
#3

Quote:
Originally Posted by gamer_Z
well have u followed kc's NPC tut?
show us your code.
as i said i have other bots working (13)
so the code is ok

but here it is
Code:
new BotCar5;
Code:
ConnectNPC("Train_Driver","train");
BotCar5 = CreateVehicle(538, -136.9001,1284.6094,20.6037,94.1330, 1, 1, 50000);
Code:
if(!strcmp(npcname, "Train_Driver", true))
    {
      SetPlayerInterior(playerid,0);
			SetPlayerVirtualWorld(playerid,0);
			SetPlayerSkin(playerid,202);
			PutPlayerInVehicle(playerid, BotCar5, 0);
			return 1;
    }
Code:
#define RECORDING "train" //This is the filename of your recording without the extension.
#define RECORDING_TYPE 1 //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
Reply
#4

I think if you are creating trains you need to use AddStaticVehicle.
Reply
#5

Quote:
Originally Posted by OnTop2K9
I think if you are creating trains you need to use AddStaticVehicle.
yeah, thx, its working now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)