17.08.2012, 11:45
Olб a todos,
Desde jб agradeзo a todos por tentar ajudar.
O meu problema й o BOT que nгo entra no servidor, nгo chega nem a logar.
Eu coloquei ele em FilterScript em vez de colocar no GM
FilterScript:
FilterScript em NPCMode:
Pronto, tenho o botonibus.rec claro
Obrigado desde jб.
Desde jб agradeзo a todos por tentar ajudar.
O meu problema й o BOT que nгo entra no servidor, nгo chega nem a logar.
Eu coloquei ele em FilterScript em vez de colocar no GM
FilterScript:
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#include <a_npc>
#if defined FILTERSCRIPT
new OnFilterScriptInit; //Variavel globalpublic OnFilterScriptInit()
{
print("Bot Onibus");
ConnectNPC("BotOnibusNPC","botonibus");
MeuPrimeiroNPCVehicle = CreateVehicle(400, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
ConnectNPC("Cesar_Xavier","botonibus"
return 1;
}
public OnPlayerConnect(playerid)
{
if(IsPlayerNPC(playerid)) 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, "BotOnibusNPC", true)) //Checando se o nome do NPC й MeuPrimeiroNPC
{
PutPlayerInVehicle(playerid, BotOnibusNPCVehicle, 0); //Colocar o NPC dentro do veнculo que criamos para isso.
} return 1;
} //Outras coisas para os jogadores normais vai aqui!
return 1;
}
#endif
pawn Код:
#define RECORDING "botonibus" //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
Pronto, tenho o botonibus.rec claro

Obrigado desde jб.