05.06.2011, 13:27
Vi as dъvidas dos caras lб no tуpico https://sampforum.blast.hk/showthread.php?tid=109701 mas deu 1 erro...
Ajuda aк, primeira vez que tento fazer um NPC.
pawn Код:
#include <a_samp>
#include <a_npc>
#define RECORDING "meunpc" //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й.
#include <a_npc>
main(){}
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#if RECORDING_TYPE == 2
#else
public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("MoS 0.0.1");
ConnectNPC("Biquini","meunpc");
return 1;
}
public OnFilterScriptExit()
{
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, "Biquini", true)) //Checando se o nome do NPC й MeuPrimeiroNPC
{
GivePlayerWeapon(playerid, 23, 100);
}
return 1;
}
//Outras coisas para os jogadores normais vai aqui!
return 1;
}
Код:
C:\Documents and Settings\Luciano\Desktop\Servidores\Masters of Stunt\filterscripts\Npc.pwn(9) : warning 235: public function lacks forward declaration (symbol "OnRecordingPlaybackEnd") C:\Documents and Settings\Luciano\Desktop\Servidores\Masters of Stunt\filterscripts\Npc.pwn(9) : error 017: undefined symbol "StartRecordingPlayback" C:\Documents and Settings\Luciano\Desktop\Servidores\Masters of Stunt\filterscripts\Npc.pwn(43) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.