Hi all,
Ich hab ein prob mit meinem GameTextForPlayer.
forward Andere();
public Andere()
{
new tString[128];
for(new i=0;i<=MAX_PLAYERS;i++)
{
new VehID = GetPlayerVehicleID(i);
if(IsPlayerConnected(i) == 1)
{
if(IstAnTankStation(i))
{
format(tString,sizeof(tString),"~g~Tankstelle~n~~w~Schreibe ~y~/fill ~w~um zu Tanken ~b~%s",FahrzeugNamen[GetVehicleModel(VehID)-400]);
GameTextForPlayer(i,tString,2500,3);
return 1;
}
}
}
return 1;
}
new Zeit_Anderes;
Zeit_Anderes = SetTimer("Andere",700,1);
forward IstAnTankStation(playerid);
public IstAnTankStation(playerid)
{
if(IsPlayerConnected(playerid) == 1)
{
if(BekommeFahrzeugTyp(GetPlayerVehicleID(playerid)) == 4) // Fahrzeuge
{
if(IsPlayerInRangeOfPoint(playerid,5.0,1595.5406, 2198.0520, 10.3863)) return 1;
if(IsPlayerInRangeOfPoint(playerid,5.0,2202.0649, 2472.6697, 10.5677)) return 1;
if(IsPlayerInRangeOfPoint(playerid,5.0,2115.1929, 919.9908, 10.5266)) return 1;
if(IsPlayerInRangeOfPoint(playerid,5.0,2640.7209, 1105.9565, 10.5274)) return 1;
if(IsPlayerInRangeOfPoint(playerid,5.0,608.5971, 1699.6238, 6.9922)) return 1;
if(IsPlayerInRangeOfPoint(playerid,5.0,618.4878, 1684.5792, 6.9922)) return 1;
if(IsPlayerInRangeOfPoint(playerid,5.0,2146.3467, 2748.2893, 10.5245)) return 1;
if(IsPlayerInRangeOfPoint(playerid,5.0,-1679.4595, 412.5129, 6.9973)) return 1;
if(IsPlayerInRangeOfPoint(playerid,5.0,-1327.5607, 2677.4316, 49.8093)) return 1;
if(IsPlayerInRangeOfPoint(playerid,5.0,-1470.0050, 1863.2375, 32.3521)) return 1;
if(IsPlayerInRangeOfPoint(playerid,5.0,-2409.2200, 976.2798, 45.2969)) return 1;
if(IsPlayerInRangeOfPoint(playerid,5.0,-2244.1396, -2560.5833, 31.9219)) return 1;
if(IsPlayerInRangeOfPoint(playerid,5.0,-1606.0544, -2714.3083, 48.5335)) return 1;
if(IsPlayerInRangeOfPoint(playerid,5.0,1937.4293, -1773.1865, 13.3828)) return 1;
if(IsPlayerInRangeOfPoint(playerid,5.0,-91.3854, -1169.9175, 2.4213)) return 1;
if(IsPlayerInRangeOfPoint(playerid,5.0,1383.4221, 462.5385, 20.1506)) return 1;
if(IsPlayerInRangeOfPoint(playerid,5.0,660.4590, -565.0394, 16.3359)) return 1;
if(IsPlayerInRangeOfPoint(playerid,5.0,1381.7206, 459.1907, 20.3452)) return 1;
if(IsPlayerInRangeOfPoint(playerid,5.0,-1605.7156, -2714.4573, 48.5335)) return 1;
if(IsPlayerInRangeOfPoint(playerid,5.0,-2029.4047,157.2388,28.5722)) return 1;
}
else if(BekommeFahrzeugTyp(GetPlayerVehicleID(playerid)) == 5) //Züge
{
if(IsPlayerInRangeOfPoint(playerid,15.0,-1942.9868,165.1557,27.0006)) return 1;
if(IsPlayerInRangeOfPoint(playerid,15.0,580.2509,1277.5377,12.2308)) return 1;
if(IsPlayerInRangeOfPoint(playerid,15.0,1434.4961,2634.3953,10.8203)) return 1;
if(IsPlayerInRangeOfPoint(playerid,15.0,1695.2933,-1953.6426,14.8756)) return 1;
}
}
return 1;
}
public Andere wird ausgeführt sobald Ich mich auf ein bzw in ein Fahrzeug setze, also der GameTextForPlayer wird dann angezeigt obwohl Ich doch nicht mal an einer Tankstelle bin,
erkennt jmd den Fehler?
Mfg