Guten Mittag Community,
ich habe mich gerade mit den Bots beschaftigt.
Mein Ergbenis:
#include "a_npc"
#define RECORDING "BOT_LS"
main()
{
}
public OnRecordingPlaybackEnd()
{
StartRecordingPlayback(1, RECORDING);
}
public OnNPCEnterVehicle(vehicleid, seatid)
{
StartRecordingPlayback(1, RECORDING);
}
public OnNPCExitVehicle()
{
StopRecordingPlayback();
}
Gamemode:
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "BOT_LS", true))
{
PlayerInfo[playerid][pCarLic] = 1;
PutPlayerInVehicle(playerid, car_BOT_LS, 0);
}
}
return 1;
}
public OnPlayerConnect(playerid))
{
if(IsPlayerNPC(playerid))
{
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "BOT_LS", true))
{
gPlayerLogged[playerid] = 1;
SpawnPlayer(playerid);
return 1;
}
}
return 1;
}
Bei OnGameModInt
ConnectNPC("BOT_LS","BOT_LS");
car_BOT_LS = CreateVehicle(596, 1000.0,1000.0, 1000.0, 0.0, 10, 1, -1);
Neues New
new car_BOT_LS;
Ergebnis:
Serverlog:
[15:56:58] Number of vehicle models: 65
[15:56:58] Incoming connection: 127.0.0.1:59253
Kann mir einer Sagen wo der Fehler ist ?
Ich verwende ein LoH 0.4 Script
MFG
.Selfmade