#include <a_npc>
main(){}
#define REC_NAME "bot" // Aquн deberбn de poner el nombre del archivo .rec
#define NPC_TYPE 0 // 0 serб a pie, cambiamos a 1 si grabemos en vehнculo.
public OnRecordingPlaybackEnd() //Cuando la reproducciуn del bot ha terminado..
{
StartRecordingPlayback(NPC_TYPE, REC_NAME); //Volvemos a empezarla...
return 1;
}
#if NPC_TYPE == 0
public OnNPCSpawn() //Cuando el bot spawnea
{
StartRecordingPlayback(NPC_TYPE, REC_NAME); //Comenzamos la reproducciуn del bot.
return 1;
}
#else
public OnNPCEnterVehicle(vehicleid, seatid) //Cuando el bot entra a un vehнculo
{
StartRecordingPlayback(NPC_TYPE, REC_NAME);
return 1;
}
public OnNPCExitVehicle() //Cuando el bot sale de un vehнculo
{
StopRecordingPlayback();
return 1;
}
public OnPlayerStreamIn(playerid)
{
SendCommand("/Owned"); // <---------------- Tienes que agregar est public con el resto
// DEBAJO DE OnNPCSpawn()
return 1;
}
#endif
ConnectNPC("El_Camello", "bot");
if(IsPlayerNPC(playerid))
{
new npcname[24];
GetPlayerName(playerid, npcname, 24);
if(!strcmp(npcname, "El_Camello", true))
{
TogglePlayerControllable(playerid, false);
SetPlayerSkin(playerid, 106);
SetPlayerPos(playerid,2356.9739,-1693.7312,13.4225);
SetPlayerFacingAngle(playerid, 186.2767);
}
return 1;
}
echo Executing Server Config...
lanmode 1
maxplayers 50
port 7777
hostname
gamemode0 gm
filterscripts npc_record
announce 0
plugins streamer.dll sscanf.dll MapAndreas.dll dns.dll
query 1
chatlogging 0
weburl [url]www.sa-mp.com[/url]
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
maxnpc 4
if(IsPlayerNPC(playerid)) return 1;
|
Si te fijas peguй el server.cfg y se puede ver el "maxnpc 4".
Los npcs entran en el servidor pero la cuestiуn es que son invisibles. Si me teleporto a ellos me lleva a la granja pero los bots spawnean. |
#include <a_npc>
main(){}
#define REC_NAME "bot" // Aquн deberбn de poner el nombre del archivo .rec
#define NPC_TYPE 0 // 0 serб a pie, cambiamos a 1 si grabemos en vehнculo.
public OnRecordingPlaybackEnd() //Cuando la reproducciуn del bot ha terminado..
{
StartRecordingPlayback(NPC_TYPE, El_Camello); //Volvemos a empezarla...
return 1;
}
#if NPC_TYPE == 0
public OnNPCSpawn() //Cuando el bot spawnea
{
StartRecordingPlayback(NPC_TYPE, El_Camello); //Comenzamos la reproducciуn del bot.
return 1;
}
#else
public OnNPCEnterVehicle(vehicleid, seatid) //Cuando el bot entra a un vehнculo
{
StartRecordingPlayback(NPC_TYPE, El_Camello);
return 1;
}
public OnNPCExitVehicle() //Cuando el bot sale de un vehнculo
{
StopRecordingPlayback();
return 1;
}
public OnPlayerStreamIn(playerid)
{
SendCommand("/Owned"); // <---------------- Tienes que agregar est public con el resto
// DEBAJO DE OnNPCSpawn()
return 1;
}
#endif
|
Siguen sin aparecer, como dije lo puse en un gm de 0 y funcionaba bien pero al meterlo en mi gm no se ven pero conectan.
|
|
Supongo que serб algo del gamemode que puede interferir pero no veo nada raro...
ї Que cuenta ?. |
if(IsPlayerNPC(playerid)) return SpawnPlayer(playerid);