[Problema] NPC Motorista -
Lуs - 27.08.2011
Pessoal, hoje fiz um bot para que faзa uma linha de busгo por LS, mais o problema й, O BIXO FDP NГO Й SETADO PRO BUSГO NEM FUDENDO!!!!!!!
Jб tentei com outros arquivos de gravaзгo.
pawn Код:
#define RECORDING "rota1" //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);
#endif
OnGameModeInit:
pawn Код:
ConnectNPC("Motorista1","buzao1");
  NPCrota1 = AddStaticVehicle(437,1782.98864746,-2025.30139160,13.85988808,180.75000000,-1,-1); //Coach
OnPlayerSpawn:
pawn Код:
if(IsPlayerNPC(playerid))
  {
    if(!strcmp(Nome, "Motorista1", true))
    {
      PutPlayerInVehicle(playerid, NPCrota1, 0);
    }
   }
Re: [Problema] NPC Motorista -
[AF]Junior - 27.08.2011
pawn Код:
if(IsPlayerNPC(playerid))
  {
    if(!strcmp(Nome, "Motorista1", true))
    {
      PutNPCInVehicle(npcid, NPCrota1, 0);
    }
   }
Nгo seria:
pawn Код:
if(IsPlayerNPC(playerid))
  {
    if(!strcmp(Nome, "Motorista1", true))
    {
      PutNPCInVehicle(npcid, Motorista1, 0);
    }
   }
?
Re: [Problema] NPC Motorista -
Lуs - 27.08.2011
Motorista1 й o Nome do NPC, NPCrota1 й o define do busгo, ou seja, ele vai botar o NPC no veнculo definido como NPCrota1. E ali eu errei, jб consertei.
Re: [Problema] NPC Motorista -
[AF]Junior - 27.08.2011
pawn Код:
if(IsPlayerNPC(playerid))
  {
    if(!strcmp(Nome, "Motorista1", true))
    {
      PutPlayerInVehicle(playerid, NPCrota1, 0);
    }
   }
Nгo seria Putnpcinvehicle ou algo assim? Nunca mexi com npc :/
@edit
Pesquisei e achei:
PutNPCInVehicle(npcid,NPCrota1,0); pÑ…e isso no seu code.
Re: [Problema] NPC Motorista -
WLSF - 27.08.2011
jб tentou trocar
por
Re: [Problema] NPC Motorista -
Lуs - 27.08.2011
Nгo, pois se eu usar o NPC, vou ter que usar uma include e essa include foi banida do SA:MP. E outra, eu testei aqui tentando setar uma skin para o NPC e foi de boa, nгo sei porque nгo tб colocando ele no busгo '-'
Re: [Problema] NPC Motorista -
Allan Kardec - 27.08.2011
Existe uma include, se nгo me engano й a core.inc que permite o uso da sintaxe PutNPCInVehicle.
Re: [Problema] NPC Motorista -
Lуs - 27.08.2011
Pois eu uso a core.inc e eu coloquei aqui e deu undefined symbol...
Re: [Problema] NPC Motorista -
[AF]Junior - 27.08.2011
Dei uma pesquisada e tem uma tal
#include <cnpc>
essa foi banida? se nгo for, procure ela
Re: [Problema] NPC Motorista -
Lуs - 27.08.2011
Sim Junior, era uma include e tambйm um plugin:
https://sampforum.blast.hk/showthread.php?tid=232838