Hallo.
Ich wollte geradeeben auf meinem Server paar NPCs einfügen. Habe dies auch gemacht, aber leider diesconnecten die sofort:
[13:00:06] [npc:join] Tom has joined the server (1:127.0.0.1)
[13:00:06] [npc:join] Andrew has joined the server (2:127.0.0.1)
[13:00:06] [npc:join] Johnson has joined the server (3:127.0.0.1)
[13:00:06] [npc:join] Anderson has joined the server (4:127.0.0.1)
[13:00:06] [npc:join] Mike has joined the server (0:127.0.0.1)
[13:00:06] [npc:join] Mathew has joined the server (5:127.0.0.1)
[13:00:06] [npc:join] Davidson has joined the server (6:127.0.0.1)
[13:00:06] [npc:join] Moralles has joined the server (7:127.0.0.1)
[13:00:06] [npc:join] Yards has joined the server (8:127.0.0.1)
[13:00:06] [npc:join] Kelroy has joined the server (9:127.0.0.1)
[13:00:06] [npc:join] Sarah has joined the server (10:127.0.0.1)
[13:00:06] [npc:join] Michael has joined the server (11:127.0.0.1)
[13:00:06] [npc:join] Roy has joined the server (12:127.0.0.1)
[13:00:11] [npc:part] Mike has left the server (0:2)
[13:00:11] [npc:part] Davidson has left the server (6:2)
[13:00:11] [npc:part] Michael has left the server (11:2)
[13:00:11] [npc:part] Roy has left the server (12:2)
[13:00:12] [npc:part] Anderson has left the server (4:2)
[13:00:12] [npc:part] Mathew has left the server (5:2)
[13:00:12] [npc:part] Kelroy has left the server (9:2)
[13:00:12] [npc:part] Moralles has left the server (7:2)
[13:00:12] [npc:part] Sarah has left the server (10:2)
[13:00:12] [npc:part] Johnson has left the server (3:2)
[13:00:12] [npc:part] Yards has left the server (8:2)
[13:00:12] [npc:part] Andrew has left the server (2:2)
[13:00:12] [npc:part] Tom has left the server (1:2)
Alles anzeigen
Hier ist mal der ausschnitt aus der server.log
Mein Script sieht wiefolgt aus:
#include <a_samp>
#include <a_npc>
new Coach1;
new Coach2;
new Barracks;
new LSPDcar;
new Ambulance;
new Ambulanceheli;
new Firetruck;
new Hunter;
new PDbike;
new Train;
new Infernus;
new Sultan;
new AT400;
public OnGameModeInit()
{
ConnectNPC("Mike","busbot");
ConnectNPC("Tom","busbot2");
ConnectNPC("Andrew","barracksbot");
ConnectNPC("Johnson","copcarbot");
ConnectNPC("Anderson","ertbot");
ConnectNPC("Mathew","erthelicopterbot");
ConnectNPC("Davidson","firetruckbot");
ConnectNPC("Moralles","hunterbot");
ConnectNPC("Yards","policebikebot");
ConnectNPC("Kelroy","trainbot");
ConnectNPC("Sarah","infbot");
ConnectNPC("Michael","sultanbot1");
ConnectNPC("Roy","at400bot");
Coach1 = AddStaticVehicle(437, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);
Coach2 = AddStaticVehicle(437, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);
Barracks = AddStaticVehicle(433, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);
LSPDcar = AddStaticVehicle(596, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);
Ambulance = AddStaticVehicle(416, 2109.1763, 1503.0453, 32.2887, 82.2873, 3, 6);
Ambulanceheli = AddStaticVehicle(563, 2109.1763, 1503.0453, 32.2887, 82.2873, 3, 6);
Firetruck = AddStaticVehicle(407, 2109.1763, 1503.0453, 32.2887, 82.2873, 6, 3);
Hunter = AddStaticVehicle(425, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 0);
PDbike = AddStaticVehicle(523, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);
Train = AddStaticVehicle(538, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);
Infernus = AddStaticVehicle(411, 2109.1763, 1503.0453, 32.2887, 82.2873, 3, 3);
Sultan = AddStaticVehicle(560, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 0);
AT400 = AddStaticVehicle(577, 2109.1763, 1503.0453, 32.2887, 82.2873, 1, 3);
}
public OnPlayerSpawn(playerid)
{
if(!IsPlayerNPC(playerid)) return 0;
new playername[64];
GetPlayerName(playerid,playername,64);
if(!strcmp(playername,"Mike",true)) {
PutPlayerInVehicle(playerid, Coach1, 0);
}
else if(!strcmp(playername,"Tom",true)) {
PutPlayerInVehicle(playerid, Coach2, 0);
}
else if(!strcmp(playername,"Andrew",true)) {
PutPlayerInVehicle(playerid, Barracks, 0);
}
else if(!strcmp(playername,"Johnson",true)) {
PutPlayerInVehicle(playerid, LSPDcar, 0);
}
else if(!strcmp(playername,"Anderson",true)) {
PutPlayerInVehicle(playerid, Ambulance, 0);
}
else if(!strcmp(playername,"Mathew",true)) {
PutPlayerInVehicle(playerid, Ambulanceheli, 0);
}
else if(!strcmp(playername,"Davidson",true)) {
PutPlayerInVehicle(playerid, Firetruck, 0);
}
else if(!strcmp(playername,"Moralles",true)) {
PutPlayerInVehicle(playerid, Hunter, 0);
}
else if(!strcmp(playername,"Yards",true)) {
PutPlayerInVehicle(playerid, PDbike, 0);
}
else if(!strcmp(playername,"Kelroy",true)) {
PutPlayerInVehicle(playerid, Train, 0);
}
else if(!strcmp(playername,"Sarah",true)) {
PutPlayerInVehicle(playerid, Infernus, 0);
}
else if(!strcmp(playername,"Michael",true)) {
PutPlayerInVehicle(playerid, Sultan, 0);
}
else if(!strcmp(playername,"Roy",true)) {
PutPlayerInVehicle(playerid, AT400, 0);
}
return 1;
}
Weis einer woran das liegen kann mit dem sofortigen disconnect?
Gruß Tim