Wo ist der verdammte fehler?
(1291) : error 032: array index out of bounds (variable "Tankstellen")
new Float:Tankstellen[1][3] =
{
{1940.7595,-1773.0271,13.3906}
};
if(strcmp("/tanken", cmdtext,true, 10) ==0)
{
if(IsPlayerInAnyVehicle(playerid))
{
for(new i=0;i<1;i++)
{
if(IsPlayerInRangeOfPoint(playerid,15.0,Tankstellen[i][1],Tankstellen[i][2],Tankstellen[i][3]))//<---- hier ist der fehler
{
new Wagen = GetPlayerVehicleID(playerid), msg[128];
new Full = 100-Tankmenge[Wagen];
new Kosten = Full*50;
if(german[playerid] == 1)
{
format(msg, sizeof msg,"Du hast %d Liter für %d$ getankt.",Full,Kosten);
SendClientMessage(playerid,ORANGE,msg);
}
if(english[playerid] == 1)
{
format(msg, sizeof msg,"You has %d Liter gas for %d$ fill.",Full,Kosten);
SendClientMessage(playerid,ORANGE,msg);
}
Tankmenge[Wagen] = 100;
return 1;
}
else
{
if(german[playerid] == 1)
{
SendClientMessage(playerid,ORANGE,"Du bist nicht an der Tankstelle!");
}
if(english[playerid] == 1)
{
SendClientMessage(playerid,ORANGE,"You are not at the gas station!");
}
}
}
}
else
{
if(german[playerid] == 1)
{
SendClientMessage(playerid,ORANGE,"Du bist in keinem Fahrzeug!");
}
if(english[playerid] == 1)
{
SendClientMessage(playerid,ORANGE,"You're not in a vehicle!");
}
}
return 1;
}