NPC in boat bug
#1

Hi guys, i created NPC to drive a boat and i recorded him in boat with /vrecord, and when i connect him he just spawn at cords where record starts and he is in water and boat is behind him, and i change vehicle model to car(infernus,turismo...) and then works perfect?

What is problem?
Reply
#2

BUMP
Reply
#3

Can you at least show us your NPC spawning/placing in vehicle code?
Reply
#4

here u go:

Code:
new MyFirstNPCVehicle;
ConnectNPC("Diler","mini");
MyFirstNPCVehicle = CreateVehicle(473, 2333.1509,-3322.9014,-0.4635, 1.6437, 0, 0, 5000);
now on player spawn:

Code:
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
  {
 // print("diler 2 spawn priprema");
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
    if(!strcmp(npcname, "Diler", true)) //Checking if the NPC's name is MyFirstNPC
    {
      npcid = playerid;
      PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0);
    }
    return 1;
  }
and he just spawn under the vehicle...
Reply
#5

BUMP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)