Hey Leute ;),
habe ein Problem:
Wenn ich in den BusBot gehe und alles halt, dann gehts manchmal, und manchmal nicht, egal wie oft ich diese Strecke fahre ![]()
Und manchmal gehts garnicht eine ganze Fahrt und manchmal wieder abundzu also manche Sounds bzw, Haltestellen.
forward Timer11(playerid);
Function OnGameModeInit();
{
SetTimer("Timer11",250, 1); // SyncUp + InCreasePlayerMinute
//...
//...
//...
return 1;
}
public Timer11(playerid)
{
/*for(new i = 0; i < MAX_PLAYERS; i++)
{*/
if(IsPlayerConnected(playerid))
{
//SendClientMessage(i, COLOR_YELLOW2, "BotHS!");
if(IsPlayerInVehicle(playerid, BusBot3))
{
//SendClientMessage(i, COLOR_YELLOW2, "PENIS!!!");
if(PlayerToPoint(15.5,playerid,1823.8427,-1768.6980,13.4842))
{
PlayAudioStreamForPlayer(playerid, "http://www.fileden.com/files/2012/2/13/3264287/Skatepark.mp3");
SendClientMessage(playerid, COLOR_YELLOW2, "Nächste Haltestelle: Skatepark");
return 1;
}
else if(PlayerToPoint(15.5,playerid,1852.9548,-1214.0884,19.8843))
{
PlayAudioStreamForPlayer(playerid, "http://www.fileden.com/files/2012/2/13/3264287/Bank.mp3");
SendClientMessage(playerid, COLOR_YELLOW2, "Nächste Haltestelle: Bank");
return 1;
}
else if(PlayerToPoint(15.5,playerid,1391.7058,-1032.5482,25.3912))
{
PlayAudioStreamForPlayer(playerid, "http://www.fileden.com/files/2012/2/13/3264287/BSN.mp3");
SendClientMessage(playerid, COLOR_YELLOW2, "Nächste Haltestelle: BSN");
return 1;
}
else if(PlayerToPoint(15.5,playerid,1214.0529,-1266.7487,13.7616))
{
PlayAudioStreamForPlayer(playerid, "http://www.fileden.com/files/2012/2/13/3264287/Krankenhaus.mp3");
SendClientMessage(playerid, COLOR_YELLOW2, "Nächste Haltestelle: Krankenhaus");
return 1;
}
else if(PlayerToPoint(15.5,playerid,1428.1515,-1572.7574,13.4540))
{
PlayAudioStreamForPlayer(playerid, "http://www.fileden.com/files/2012/2/13/3264287/Stadthalle.mp3");
SendClientMessage(playerid, COLOR_YELLOW2, "Nächste Haltestelle: Stadthalle");
return 1;
}
else if(PlayerToPoint(15.5,playerid,1566.8224,-1848.5660,13.4754))
{
PlayAudioStreamForPlayer(playerid, "http://www.fileden.com/files/2012/2/13/3264287/Zivispawn.mp3");
SendClientMessage(playerid, COLOR_YELLOW2, "Nächste Haltestelle: Zivispawn");
return 1;
}
//return 1;
}
}
return 1;
/*}
return 1;*/
}
Ich denke es gibt ein paar Probleme mit dem if, else if und dem return 1;
Woüfr benutze ich "if" und wofür "else if" ?
und wann "return 1;" am ende und wann ""(garnichts) am ende ?
MfG
GermanCy