Bot in vehicle.
#1

Hello.
I'm saw this guide
https://sampforum.blast.hk/showthread.php?tid=95034
and not working for me.
What I did in Guide:

PHP код:
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 код:
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 код:
#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..
Reply
#2

It ust be a rec not a pwn file

And a dynamic bot always existing
Reply
#3

Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
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.
Reply
#4

DOwnload a ingame npc record and finish (-:
Reply
#5

Nevermind guys, Its work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)