SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 10/04/2014, 04:35 PM   #1
Dusan01
Huge Clucker
 
Dusan01's Avatar
 
Join Date: Jul 2011
Location: Republika Srpska, Prijedor
Posts: 484
Reputation: 42
Default NPC in boat bug

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?
__________________

My Bike KTM 450 SXF 2008


REP+ IF I HELPED!
Dusan01 is offline   Reply With Quote
Old 12/04/2014, 08:39 AM   #2
Dusan01
Huge Clucker
 
Dusan01's Avatar
 
Join Date: Jul 2011
Location: Republika Srpska, Prijedor
Posts: 484
Reputation: 42
Default Re: NPC in boat bug

BUMP
__________________

My Bike KTM 450 SXF 2008


REP+ IF I HELPED!
Dusan01 is offline   Reply With Quote
Old 13/04/2014, 05:32 AM   #3
Flake.
High-roller
 
Flake.'s Avatar
 
Join Date: Sep 2009
Location: 1400
Posts: 1,166
Reputation: 132
Default Re: NPC in boat bug

Can you at least show us your NPC spawning/placing in vehicle code?
Flake. is offline   Reply With Quote
Old 14/04/2014, 06:27 AM   #4
Dusan01
Huge Clucker
 
Dusan01's Avatar
 
Join Date: Jul 2011
Location: Republika Srpska, Prijedor
Posts: 484
Reputation: 42
Default Re: NPC in boat bug

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...
__________________

My Bike KTM 450 SXF 2008


REP+ IF I HELPED!
Dusan01 is offline   Reply With Quote
Old 15/04/2014, 09:54 AM   #5
Dusan01
Huge Clucker
 
Dusan01's Avatar
 
Join Date: Jul 2011
Location: Republika Srpska, Prijedor
Posts: 484
Reputation: 42
Default Re: NPC in boat bug

BUMP
__________________

My Bike KTM 450 SXF 2008


REP+ IF I HELPED!
Dusan01 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Map] [MAP] Boat Race mihaibr Maps 3 21/07/2014 12:02 PM
[Help] Boat dealer jason121 Help Archive 4 08/08/2010 07:31 AM
[Map] [MAP] Oil Boat lolumadd Maps 8 07/12/2009 09:49 AM
[MAP/FS] - Boat. PANNA Filterscripts 15 12/11/2009 02:11 PM
big boat id's Jason_Borne Help Archive 3 07/04/2009 11:42 PM


All times are GMT. The time now is 03:53 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.