Hallo,
Ich hab ein Problem und ein Bug wenn ich ein NPC in mein GameMode rein tu.
NPC Problem:
Spieler Spawnt in LV beim ein Haus ganz nach oben und
fährt nicht sein Bus das einglich beim BSN steht.
root-->npcmodes-->Bus.pwn&amx ist drin. Zeilen:
//////////////////////////////////////////////////
#include <a_npc>
main(){}
#define RECORDING "Bus"
// Record typ, 1 = in einen fahrzeug, 2 = zu fuß
#define RECORDING_TYPE 1
public OnRecordingPlaybackEnd()
StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCEnterVehicle(vehicleid, seatid)
StartRecordingPlayback(RECORDING_TYPE, RECORDING);
public OnNPCExitVehicle()
StopRecordingPlayback();
//////////////////////////////////////////////////
root-->npcmodes-->recordings-->Bus.rec ist drin.
root-->gamemodes-->gerrole.amx-->Alle Zeilen die für NPC Script hinzugefügt wurden:
//////////////////////////////////////////////////
new bus;
stock SpielerName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
return name;
}
//Unter
"public OnPlayerRegister(playerid, password[])
{
if(IsPlayerConnected(playerid))
{"
if(IsPlayerNPC(playerid)) return 1;
//Unter
"public OnPlayerLogin(playerid,password[])
{"
if(IsPlayerNPC(playerid)) return 1;
//Unter
"public OnGameModeInit()
{"
ConnectNPC("Busfahrer","Bus");
bus=AddStaticVehicle(437,1226.0709,-893.5596,43.1227,192.0233,151,151);
//Unter
"public OnPlayerSpawn(playerid)
{"
if(!strcmp(SpielerName(playerid),"Busfahrer",true))
{
PutPlayerInVehicle(playerid,bus,0);
}
Bug:
SERVER MOTD Textdraw wird ersetzt gegen $0
Zeilen:
LoadMotd();
LoadEvents();
ChangeWeather();
Textdraw2 = TextDrawCreate(0.000000,437.000000,"SERVER MOTD:");
new versions[64];
format(versions, sizeof(versions),"%s. Build %s",Motd, Version);
Textdraw3 = TextDrawCreate(303.000000,437.000000,versions);
TextDrawUseBox(Textdraw2,1);
TextDrawBoxColor(Textdraw2,0x00000066);
TextDrawTextSize(Textdraw2,700.000000,1500.000000);
TextDrawAlignment(Textdraw2,1);
TextDrawAlignment(Textdraw3,2);
TextDrawBackgroundColor(Textdraw2,0x00000066);
TextDrawBackgroundColor(Textdraw3,0x000000ff);
TextDrawFont(Textdraw2,1);
TextDrawLetterSize(Textdraw2,0.299999,1.000000);
TextDrawFont(Textdraw3,2);
TextDrawLetterSize(Textdraw3,0.399999,1.000000);
TextDrawColor(Textdraw2,0x00ff00cc);
TextDrawColor(Textdraw3,0xffffffff);
TextDrawSetOutline(Textdraw2,1);
TextDrawSetOutline(Textdraw3,1);
TextDrawSetProportional(Textdraw2,1);
TextDrawSetProportional(Textdraw3,1);
TextDrawSetShadow(Textdraw2,1);
TextDrawSetShadow(Textdraw3,1);
Könnt ihr mir bitte helfen?