11.09.2011, 21:14
estou aprendendo a cria npc li o tutorial que tem aki e fiz esse pawno
mais quando copilo da esses erros
aki tb o pawno na pasta npcmodes
nome do gm : aviao, nome do .rec: aviao e nome do pwn na pasta npcmodes:aviao
PHP код:
#include <a_samp>
#include <a_npc>
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("aviao");
AddPlayerClass(0,1989.14086914,-2593.35913086,12.54687500, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
new aviaonpc;
public OnFilterScriptInit()
{
print("aviao");
ConnectNPC("aviao","aviao");
aviaonpc = CreateVehicle(592, -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, "aviao", true)) //Checando se o nome do NPC й MeuPrimeiroNPC
{
PutPlayerInVehicle(playerid, aviaonpc, 0); //Colocar o NPC dentro do veнculo que criamos para isso.
}
return 1;
}
PHP код:
C:\Documents and Settings\Antonio\Desktop\Cуpia de samp host\gamemodes\aviao.pwn(34) : warning 217: loose indentation
C:\Documents and Settings\Antonio\Desktop\Cуpia de samp host\gamemodes\aviao.pwn(36) : error 030: compound statement not closed at the end of file (started at line 26)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
PHP код:
#define RECORDING "aviao" //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й.
#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