SA-MP Forums Archive
[Ajuda] Criaзгo de FilterScript - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Criaзгo de FilterScript (/showthread.php?tid=493380)



Criaзao de NPC - brunoboy - 08.02.2014

Boas eu estou tendo alguns erros ao compilar o meu filterscript do NPC e nao sei porque alguem pode ajudar ai pls

Ai estб o FilterScript do NPC

PHP код:
#define RECORDING "Taxi" //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_TYPERECORDING);
#if RECORDING_TYPE == 1
  
public OnNPCEnterVehicle(vehicleidseatidStartRecordingPlayback(RECORDING_TYPERECORDING);
  public 
OnNPCExitVehicle() StopRecordingPlayback();
#else
  
public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPERECORDING);
#endif
public OnFilterScriptInit()
{
  print(
"my filterscript");
  
ConnectNPC("MyFirstNPC","Taxi");
  return 
1;
}
new 
MyFirstNPCVehicle//Global variable!
public OnFilterScriptInit()
{
  print(
"my filterscript");
  
ConnectNPC("MyFirstNPC","Taxi");
  
MyFirstNPCVehicle CreateVehicle(4000.00.05.00.0335000);
  return 
1;
}
public 
OnPlayerSpawn(playerid)
{
  if(
IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
  
{
    new 
npcname[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnpcnamesizeof(npcname)); //Getting the NPC's name.
    
if(!strcmp(npcname"MyFirstNPC"true)) //Checking if the NPC's name is MyFirstNPC
    
{
      
PutPlayerInVehicle(playeridMyFirstNPCVehicle0); //Putting the NPC into the vehicle we created for it.
    
}
    return 
1;
  }
  
//Other stuff for normal players goes here!
  
return 1;

Erros:

PHP код:
C:\Users\Bruno\Desktop\npc.pwn(15) : warning 235: public function lacks forward declaration (symbol "OnFilterScriptInit")
C:\Users\Bruno\Desktop\npc.pwn(18) : error 017undefined symbol "ConnectNPC"
C:\Users\Bruno\Desktop\npc.pwn(23) : warning 235: public function lacks forward declaration (symbol "OnFilterScriptInit")
C:\Users\Bruno\Desktop\npc.pwn(24) : error 021symbol already defined"OnFilterScriptInit"
C:\Users\Bruno\Desktop\npc.pwn(26) : error 017undefined symbol "ConnectNPC"
C:\Users\Bruno\Desktop\npc.pwn(27) : error 017undefined symbol "CreateVehicle"
C:\Users\Bruno\Desktop\npc.pwn(31) : warning 235: public function lacks forward declaration (symbol "OnPlayerSpawn")
C:\Users\Bruno\Desktop\npc.pwn(33) : error 017undefined symbol "IsPlayerNPC"
C:\Users\Bruno\Desktop\npc.pwn(39) : error 017undefined symbol "PutPlayerInVehicle"
C:\Users\Bruno\Desktop\npc.pwn(27) : warning 204symbol is assigned a value that is never used"MyFirstNPCVehicle"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
6 Errors

Nome do NPC e Taxi.Rec

Topico que segui: https://sampforum.blast.hk/showthread.php?tid=95034


Re : Criaзгo de FilterScript - brunoboy - 08.02.2014

bump


Re: Criaзгo de FilterScript - [FeK]Knife - 08.02.2014

pawn Код:
#include a_samp



Re : Criaзгo de FilterScript - brunoboy - 09.02.2014

4 Erros agora
PHP код:
C:\Users\Bruno\Desktop\npc.pwn(7) : warning 235: public function lacks forward declaration (symbol "OnRecordingPlaybackEnd")
C:\Users\Bruno\Desktop\npc.pwn(7) : error 017undefined symbol "StartRecordingPlayback"
C:\Users\Bruno\Desktop\npc.pwn(10) : warning 235: public function lacks forward declaration (symbol "OnNPCEnterVehicle")
C:\Users\Bruno\Desktop\npc.pwn(10) : error 017undefined symbol "StartRecordingPlayback"
C:\Users\Bruno\Desktop\npc.pwn(11) : warning 235: public function lacks forward declaration (symbol "OnNPCExitVehicle")
C:\Users\Bruno\Desktop\npc.pwn(11) : error 017undefined symbol "StopRecordingPlayback"
C:\Users\Bruno\Desktop\npc.pwn(25) : error 021symbol already defined"OnFilterScriptInit"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors




Re: Criaзгo de FilterScript - zSuYaNw - 09.02.2014

Atualize suas includes jovem, talvez esta seja a principal causa.


Re : Criaзгo de FilterScript - brunoboy - 09.02.2014

Actualizado mas continuam os erros :SS


Re : Criaзгo de FilterScript - brunoboy - 13.02.2014

bump