Hallo
Mein Bot Connected nicht mal. Ich weiß nicht warum.
//Globale Variable
new car_train_ls;
//GameModeInit
ConnectNPC("Lokführer","train_ls");
car_train_ls = AddStaticVehicleEx(537, 1000.0,1000.0, 1000.0, 0.0, 10, 1, -1);
//OnPlayerSpawn
if(IsPlayerNPC(playerid))
{
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "Lokführer", true))
{
PutPlayerInVehicle(playerid, car_train_ls, 0);//car_BulletLS = das Fahrzeug was wir oben erstellt haben, 0 = der Fahrersitz
}
}
//OnPlayerConnect
if(IsPlayerNPC(playerid))
{
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "Lokführer", true))
{
gPlayerLogged[playerid]=1;//Der Bot ist gleich eingeloggt (Anpassen!)
}
}
//OnPlayerRequestClass
if(IsPlayerNPC(playerid))
{
new botname[MAX_PLAYER_NAME];
GetPlayerName(playerid, botname, sizeof(botname));
if(!strcmp(botname, "Lokführer", true))
{
gPlayerLogged[playerid]=1;//Der Bot ist gleich eingeloggt (Anpassen!)
}
}