Ich denke ich brauch keine langen Sätze schreiben .. Ihr kennt es locker.. Die Bots disconnecten sofort nach dem sie drauf kommen.. naja was heißt sofort nach 5 - 7 sekunden.. Ich habe im Script eigentlich alles richtig... und maxnpc ist bei mir auf 5 gestellt.. ich besitze 3 Bots.
OnPlayerConnect:
if(IsPlayerNPC(playerid))
{
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "Linie1", true))
{
SetPVarInt(playerid,"Eingeloggt",1);
}
if(!strcmp(botname, "Linie2", true))
{
SetPVarInt(playerid,"Eingeloggt",1);
}
if(!strcmp(botname, "dodo1", true))
{
SetPVarInt(playerid,"Eingeloggt",1);
}
}
OnPlayerSpawn:
if(IsPlayerNPC(playerid))
{
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "Linie1", true))
{
SetPlayerSkin(playerid,253);
SpawnPlayer(playerid);
PutPlayerInVehicle(playerid, car_Linie1, 0);
}
if(!strcmp(botname, "Linie2", true))
{
SetPlayerSkin(playerid,253);
SpawnPlayer(playerid);
PutPlayerInVehicle(playerid, car_Linie2, 0);
}
if(!strcmp(botname, "dodo1", true))
{
SetPlayerSkin(playerid,253);
SpawnPlayer(playerid);
PutPlayerInVehicle(playerid, car_dodo1, 0);
}
}
OnGameModeInit:
print("Die Bots spawnen jetzt!");
ConnectNPC("Linie1","Linie1");
car_Linie1 = CreateVehicle(431, 1000.0,1000.0, 1000.0, 0.0, 10, 1, 3);
ConnectNPC("Linie2","Linie2");
car_Linie2 = CreateVehicle(431, 1000.0,1000.0, 2000.0, 0.0, 10, 1, 2);
ConnectNPC("dodo1","dodo1");
car_dodo1 = CreateVehicle(593, 1000.0,1000.0, 2000.0, 0.0, 10, 1, 2);
Die ganzen cars_ sind auch oben "genewt"