SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 13/09/2012, 04:03 PM   #1
Userpwon
Little Clucker
 
Join Date: Nov 2011
Posts: 43
Reputation: 0
Default Bot in vehicle.

Hello.
I'm saw this guide
http://forum.sa-mp.com/showthread.php?t=95034
and not working for me.
What I did in Guide:

PHP Code:
public OnPlayerSpawn(playerid){  if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.  {    new npcname[MAX_PLAYER_NAME];    GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.    if(!strcmp(npcname, "MyFirstNPC", true)) //Checking if the NPC's name is MyFirstNPC    {      PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0); //Putting the NPC into the vehicle we created for it.    }    return 1;  }  //Other stuff for normal players goes here!  return 1;} 
PHP Code:
new MyFirstNPCVehicle//Global variable!public OnFilterScriptInit(){  print("my filterscript");  ConnectNPC("MyFirstNPC","mynpc");  MyFirstNPCVehicle = CreateVehicle(424, 2063.9360,832.2281,6.7344,266.7116, 3, 3, 5000);  return 1;} 
And the vehicle is not moving!
I opened a new pwn named racebot and i put it in the folder "npcmodes" inside the pwn is write.
PHP Code:
#define RECORDING "racebot" //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);#endifpublic OnPlayerDeath(playerid, killerid, reason){    return 1;} 
Help me, I dont know..
Userpwon is offline   Reply With Quote
Old 13/09/2012, 04:07 PM   #2
[Bios]Marcel
Huge Clucker
 
[Bios]Marcel's Avatar
 
Join Date: Jul 2012
Posts: 389
Reputation: 19
Default AW: Bot in vehicle.

It ust be a rec not a pwn file

And a dynamic bot always existing
[Bios]Marcel is offline   Reply With Quote
Old 13/09/2012, 04:13 PM   #3
Userpwon
Little Clucker
 
Join Date: Nov 2011
Posts: 43
Reputation: 0
Default Re: AW: Bot in vehicle.

Quote:
Originally Posted by [Bios]Marcel View Post
It ust be a rec not a pwn file

And a dynamic bot always existing
But look, I recorded, and opened a folder "npcmodes" and he write the to open a file pwn in "npcmodes" look on the guide.
Userpwon is offline   Reply With Quote
Old 13/09/2012, 04:31 PM   #4
[Bios]Marcel
Huge Clucker
 
[Bios]Marcel's Avatar
 
Join Date: Jul 2012
Posts: 389
Reputation: 19
Default AW: Bot in vehicle.

DOwnload a ingame npc record and finish (-:
[Bios]Marcel is offline   Reply With Quote
Old 13/09/2012, 04:57 PM   #5
Userpwon
Little Clucker
 
Join Date: Nov 2011
Posts: 43
Reputation: 0
Default Re: Bot in vehicle.

Nevermind guys, Its work.
Userpwon 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
[FilterScript] GTA's Vehicle Spawns (1040 vehicle spawn locations) Slice Filterscripts 46 11/04/2013 01:11 PM
How to detect vehicle speed and if the vehicle is moving forwards or reversing? [HLF]Southclaw Scripting Help 5 25/07/2012 10:16 PM
Angle Issues: Setting a attached object on a vehicle to face a vehicle Kar Scripting Help 2 11/07/2012 12:37 AM
[FilterScript] [FS] tAxI's Vehicle Streamer [v0.2] - add unlimited vehicle spawns and models!!! cptnsausage Filterscripts 205 31/07/2010 05:29 AM


All times are GMT. The time now is 01:08 PM.


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