[AJUDA] NPC
#1

ai pessoal segui o tuto sertin aki do forum mais deu esses 5 erros e nao consigo resolver:

pawn Код:
C:\Documents and Settings\Administrador\Desktop\0.3server\filterscripts\npc.pwn(8) : warning 235: public function lacks forward declaration (symbol "OnRecordingPlaybackEnd")
C:\Documents and Settings\Administrador\Desktop\0.3server\filterscripts\npc.pwn(8) : error 017: undefined symbol "StartRecordingPlayback"
C:\Documents and Settings\Administrador\Desktop\0.3server\filterscripts\npc.pwn(11) : warning 235: public function lacks forward declaration (symbol "OnNPCEnterVehicle")
C:\Documents and Settings\Administrador\Desktop\0.3server\filterscripts\npc.pwn(11) : error 010: invalid function or declaration
C:\Documents and Settings\Administrador\Desktop\0.3server\filterscripts\npc.pwn(11) : error 017: undefined symbol "StartRecordingPlayback"
C:\Documents and Settings\Administrador\Desktop\0.3server\filterscripts\npc.pwn(12) : warning 235: public function lacks forward declaration (symbol "OnNPCExitVehicle")
C:\Documents and Settings\Administrador\Desktop\0.3server\filterscripts\npc.pwn(12) : error 017: undefined symbol "StopRecordingPlayback"
C:\Documents and Settings\Administrador\Desktop\0.3server\filterscripts\npc.pwn(37) : warning 217: loose indentation
C:\Documents and Settings\Administrador\Desktop\0.3server\filterscripts\npc.pwn(39) : error 030: compound statement not closed at the end of file (started at line 29)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
script:

pawn Код:
#include <a_samp>
#include <a_npc>

#define RECORDING "AQNPC" //Este й o nome do seu arquivo de gravaзгo, sem a extenзгo(.rec).
#define RECORDING_TYPE 1 //1 para gravaзхes em veнculo e 2 para gravaзхes apй.

main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);

#if RECORDING_TYPE == 1
  public OnNPCEnterVehicle(520, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
  public OnNPCExitVehicle() StopRecordingPlayback();
#else
  public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif

new carronpc;

public OnFilterScriptInit()
{
  print("meu filterscript");
  ConnectNPC("Recruta","AQNPC");
  carronpc = CreateVehicle(520, -69.6176,2505.2476,17.2085, 0.0, 0, 0,500);
  return 1;
}

public OnPlayerSpawn(playerid)
{
  if(IsPlayerNPC(playerid)) //Verifica se o jogador й um NPC.
  {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname)); //Obtendo o nome do(s) NPC(s).
    if(!strcmp(npcname, "recruta", true)) //Checando se o nome do NPC й MeuPrimeiroNPC
    {
      PutPlayerInVehicle(playerid, carronpc, 0); //Colocar o NPC dentro do veнculo que criamos para isso.
    }
  return 1;
}
auguem ajuda ai *-*
Reply
#2

Nгo seria necessбrio colocar as forwards tambйm ?
Reply
#3

quais ??
Reply
#4

"\npcmodes\recordings, crie um arquivo com a extensгo .pwn e coloque isso lб"

pawn Код:
#define RECORDING "Nome do arquivo NPC na pasta recording diferenciando maiъsculo de minъsculo"
#define RECORDING_TYPE 2 //Tipo 0 Off, 1 - veiculo 2 - a pй
#include "a_npc"
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);

#if RECORDING_TYPE == 2
public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCExitVehicle() StopRecordingPlayback();
#else
public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
http://www.pawnscripts.blogspot.com/...&submit=Buscar
Reply
#5

deu serto agr mais o NPC nao aparece no sv D:
Reply
#6

maus pelo double mais colokei ele sem carro ve se ta certo:
pawn Код:
#include <a_npc>

#define RECORDING "meunpcc" //Este й o nome do seu arquivo de gravaзгo, sem a extenзгo(.rec).
#define RECORDING_TYPE 2 //1 para gravaзхes em veнculo e 2 para gravaзхes apй.

#if defined FILTERSCRIPT

main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);

#if RECORDING_TYPE == 2
#else
  public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);

new carronpc;

public OnFilterScriptInit()
{
  print("meu filterscript");
  ConnectNPC("Recruta","meunpcc");
  return 1;
}

#endif

public OnPlayerSpawn(playerid)
{
  if(IsPlayerNPC(playerid)) //Verifica se o jogador й um NPC.
  {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname)); //Obtendo o nome do(s) NPC(s).
    if(!strcmp(npcname, "recruta", true)) //Checando se o nome do NPC й MeuPrimeiroNPC
    {
      SetPlayerPos(playerid, 409.7895,2543.5811,16.4780);
      SetPlayerSkin(playerid, 45);
    }
  return 1;
}

#endif
Reply
#7

Power

Quote:
Originally Posted by roberto013
Посмотреть сообщение
"\npcmodes\recordings, crie um arquivo com a extensгo .pwn e coloque isso lб"

pawn Код:
#define RECORDING "Nome do arquivo NPC na pasta recording diferenciando maiъsculo de minъsculo"
#define RECORDING_TYPE 2 //Tipo 0 Off, 1 - veiculo 2 - a pй
#include "a_npc"
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);

#if RECORDING_TYPE == 2
public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCExitVehicle() StopRecordingPlayback();
#else
public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
http://www.pawnscripts.blogspot.com/...&submit=Buscar
isso daqui voce compila e fica la na pasta npcmodes, a gravacao fica em npcmodes\recordings e o que vai ligar o npc fica em um filterscript ou no gamemode

ou seja isto
pawn Код:
new carronpc;

public OnFilterScriptInit()
{
  print("meu filterscript");
  ConnectNPC("Recruta","meunpcc");
  return 1;
}

#endif

public OnPlayerSpawn(playerid)
{
  if(IsPlayerNPC(playerid)) //Verifica se o jogador й um NPC.
  {
    new npcname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, npcname, sizeof(npcname)); //Obtendo o nome do(s) NPC(s).
    if(!strcmp(npcname, "recruta", true)) //Checando se o nome do NPC й MeuPrimeiroNPC
    {
      SetPlayerPos(playerid, 409.7895,2543.5811,16.4780);
      SetPlayerSkin(playerid, 45);
    }
  return 1;
}
voce compila e poe na pasta filtescript ou entao coloca no gm mesmo
Reply
#8

edita server.cfg que ele fai aparecer sou novo em NPC tambem e agora ja tenho 2 NPC olha so e editar o server.cfg e mudar o maxNPC por a quantidade que voce gostaria de ter dentro do seu server olha aqui tem os codigos se quiser

http://www.4shared.com/file/v9DE920K/NPC.html aqui esta o link pode baixar viz especial agora para voce boa sorte se o conteudo for bom clicka la na estrela porfavor
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)