Hallo zusammen, entweder bin ich schon zu müde oder der NPC funkt wirklich nicht.
Die line1.pwn ist im Ordner npcmodes und die line1.rec im Ordner Recordings.
Hier der Script
line1.pwn
#define RECORDING "linie1"
#define RECORDING_TYPE 1 // 1 für in Auto 2 für Onfoot
#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
new NPC_bus;
public OnGameModeInit()
{
ConnectNPC("Hans","linie1");
NPCTextBlue = Create3DTextLabel("Linie1", COLOR_BLUE, 0.0, 0.0, 0.0, 30.0,0, 0);
NPC_bus = AddStaticVehicle(431, 1532.4520, -1692.1134, 13.3524, 0.0000, 1, 1);
return 1;
}
public OnPlayerConnect(playerid)
{
//NPC
if(IsPlayerNPC(playerid)) return 1;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
//NPC
if(IsPlayerNPC(playerid)) return 1;
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid,botname,sizeof(botname));
if(!strcmp(botname,"Hans",true))
{
SetSpawnInfo(playerid,0,253,1536.7872,-1687.5566,13.5469,88.5305,0,0,0,0,0,0);
SetPlayerColor(playerid,COLOR_BLUE);
PutPlayerInVehicle(playerid,NPC_bus,0);
Attach3DTextLabelToVehicle(NPCTextBlue,NPC_bus,0.0,0.0,0.0);
}
return 1;
}
if(IsPlayerNPC(playerid)) return 1;
return 1;
}