NPC isnt driving a train! 0.o
#1

Well i decided that i wanted to add a single vehicle to the end of my script which happened to be the fighterjet.

In my offline tests it was fine, not a problem.

I turned the npcs on online and now instead of driving a train (although i didnt leave it anywhere near the tracks) they are driving my jet!

i am calling the vehicle BEFORE ALL other vehicles.

Is it possible that because the other sets of vehicles first call these 2 files:

total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/trains.txt");
total_vehicles_from_files += LoadStaticVehiclesFromFile("vehicles/pilots.txt");

maybe its pushing npc use down a line?

can anyone tell me if this is the case that the files and my single vehicle line are getting merged by the NPCs themselves?

if they are ill move the lines to the top so i dont get them confused again.
Reply
#2

Try Creating a vehicle with a specific ID.

e.g.:
pawn Код:
new npcveh;
public OnGameModeInit()
{
npcveh = CreateVehicle(427,0.0,0.0,0.0,0.0,0,1,5000);
return 1;
}
Then put the NPC in "npcveh", not the vehicle ID.
Reply
#3

Yeah I noticed with gl_npcs if you don't add the LoadStaticVehicleFromFile lines BEFORE anything in your mode, they drive/fly around in different vehicles.

Using the ID trick would work though.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)