Hay,
Ich habe ein Problem unzwar das bei mir /tanken nicht geht...
Vielleicht könnt ihr ja helfen.
Befehl:
if(strcmp(cmd, "/tanke", true) == 0 || strcmp(cmd, "/tanken", true) == 0)
{
if(IsAtGasStation(playerid))
{
if(IsPlayerConnected(playerid))
{
if(IsAtGasStation(playerid))
{
if(IsANoTachoVehicle(GetPlayerVehicleID(playerid)))
{
ShowInfoDialog(playerid,"Tank Information","Du kannst kein Fahrrad betanken!");
}
ShowPlayerDialog(playerid,DIALOG_TANKE,DIALOG_STYLE_LIST,"Tankstelle","Fahrzeug volltanken\nBenzin Kannister kaufen","Kaufen","Abbrechen");
}
return 1;
}
}
}
Function IsAtGasStation(playerid)
{
if(IsPlayerConnected(playerid))
{// Hinter dem LSPD
if(IsPlayerInRangeOfPoint(playerid,6.0,1779.9427,-1784.9698,13.5305) || IsPlayerInRangeOfPoint(playerid,6.0,1775.6558,-1781.2843,13.5313) || IsPlayerInRangeOfPoint(playerid,6.0,1771.3665,-1778.5056,13.5316))
{
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid,6.0,1004.0070,-939.3102,42.1797) || IsPlayerInRangeOfPoint(playerid,6.0,1944.3260,-1772.9254,13.3906))
{//LS
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid,6.0,-90.5515,-1169.4578,2.4079) || IsPlayerInRangeOfPoint(playerid,6.0,1475.5549,-1730.1250,13.3828) || IsPlayerInRangeOfPoint(playerid,6.0,-1609.7958,-2718.2048,48.5391))
{//LS
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid,6.0,-2029.4968,156.4366,28.9498) || IsPlayerInRangeOfPoint(playerid,6.0,-1682.4819,418.1697,7.1797) || IsPlayerInRangeOfPoint(playerid,6.0,-2408.7590,976.0934,45.4175))
{//SF
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid,6.0,-2243.9629,-2560.6477,31.8841) || IsPlayerInRangeOfPoint(playerid,6.0,-1676.6323,414.0262,6.9484))
{//Between LS and SF
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid,6.0,2202.2349,2474.3494,10.5258) || IsPlayerInRangeOfPoint(playerid,6.0,614.9333,1689.7418,6.6968) || IsPlayerInRangeOfPoint(playerid,6.0,1694.1862,104.3128,37.5988))
{//LV
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid,6.0,-1328.8250,2677.2173,49.7665) || IsPlayerInRangeOfPoint(playerid,6.0,70.3882,1218.6783,18.5165) || IsPlayerInRangeOfPoint(playerid,10.0,2149.0142,2748.4934,10.8203))
{//LV
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid,6.0,2113.7390,920.1079,10.5255) || IsPlayerInRangeOfPoint(playerid,6.0,-1327.7218,2678.8723,50.0625) || IsPlayerInRangeOfPoint(playerid,6.0,1597.1254,2198.1113,10.8203))
{//LV
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 30.0, -1483.2017,-552.7019,14.1484) || IsPlayerInRangeOfPoint(playerid,15.0,-1675.1643,414.1799,7.1797) || IsPlayerInRangeOfPoint(playerid,15.0,-2409.8362,973.7567,45.3653))
{//LS Airport
return 1;
}
for(new i = 8; i < 17; i++)
{
if(IsPlayerInRangeOfPoint(playerid,12.0,SBizzInfo[i][sbEntranceX],SBizzInfo[i][sbEntranceY],SBizzInfo[i][sbEntranceZ]))
{
return 1;
}
}
if(IsPlayerInRangeOfPoint(playerid,12.0,2202.2349,2474.3494,10.5258) || IsPlayerInRangeOfPoint(playerid,12.0,614.9333,1689.7418,6.6968))
{//LV
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid,12.0,-1328.8250,2677.2173,49.7665) || IsPlayerInRangeOfPoint(playerid,12.0,70.3882,1218.6783,18.5165))
{//LV
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid,12.0,2113.7390,920.1079,10.5255) || IsPlayerInRangeOfPoint(playerid,12.0,-1327.7218,2678.8723,50.0625))
{//LV
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 30.0, 2002.8409,-2382.0603,13.5469))
{//LS Airport
return 1;
}
else if(IsPlayerInRangeOfPoint(playerid, 12.0, 1482.8306,-1695.1400,13.0190))
{//LS LSPD
return 1;
}
}
return 0;
}
MfG