Hi!
Ich habe nun versucht, einen Bot nur zu bestimmten Minuten connecten zu lassen (00,10,20,30,40,50)
Dies funktioniert auch(Habe in den Server - Log geschaut) aber seit dem ich diese Version machen will setzt er sich nicht mehr in das Fahrzeug in das er soll.
Mein Code:
public bot1()
{
new stunden,minuten;
gettime(stunden,minuten);
if(minuten == 00)
{
if(i == 0)
{
SetTimer("bushstcount", 1000, true);
ConnectNPC("BotLinie1ZOB_BSN","BotLinie1ZOB_BSN");
i = 1;
}
}
else if(minuten == 10)
{
if(i == 0)
{
SetTimer("bushstcount", 1000, true);
ConnectNPC("Bot2Linie1ZOB_BSN","Bot2Linie1ZOB_BSN");
i = 1;
}
}
else if(minuten == 20)
{
if(i == 0)
{
SetTimer("bushstcount", 1000, true);
ConnectNPC("BotLinie1ZOB_BSN","BotLinie1ZOB_BSN");
i = 1;
}
}
else if(minuten == 30)
{
if(i == 0)
{
SetTimer("bushstcount", 1000, true);
ConnectNPC("Bot2Linie1ZOB_BSN","Bot2Linie1ZOB_BSN");
i = 1;
}
}
else if(minuten == 40)
{
if(i == 0)
{
SetTimer("bushstcount", 1000, true);
ConnectNPC("BotLinie1ZOB_BSN","BotLinie1ZOB_BSN");
i = 1;
}
}
else if(minuten == 50)
{
if(i == 0)
{
SetTimer("bushstcount", 1000, true);
ConnectNPC("Bot2Linie1ZOB_BSN","Bot2Linie1ZOB_BSN");
i = 1;
}
}
}
OnPlayerSpawn:
if(!strcmp(SpielerName(playerid),"Bot2Linie1ZOB_BSN",true))
{
PutPlayerInVehicle(playerid,botauto,0);
}
else if(!strcmp(SpielerName(playerid),"Bot1Linie1ZOB_BSN",true))
{
PutPlayerInVehicle(playerid,botauto,0);
}
if(IsPlayerNPC(playerid))return 1;