03.12.2009, 17:13
IO get Unkwon Command, why?
pawn Код:
if(strcmp(cmd, "/fill", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInAnyVehicle(playerid))
{
if (AccountInfo[playerid][aLogged] == 0)
{
format(string, sizeof(string), "Du bist nicht eingeloggt.");
format(string2, sizeof(string2),"You are not logged in.");
SendLanguageMessage(playerid, COLOR_GREY, string, string2);
return 1;
}
new gs = GetPlayerGasStation(playerid);
if(GasStation[gs][gFuel] < 1)
{
format(string, sizeof(string), "Diese Tankstelle ist leer.");
format(string2, sizeof(string2), "This gas station has no fuel left.");
SendLanguageMessage(playerid, COLOR_GREY, string, string2);
return 1;
}
if(gs == 21)
{
format(string, sizeof(string), "Du bist nicht an einer Tankstelle.");
format(string2, sizeof(string2), "You are not at a gas station.");
SendLanguageMessage(playerid, COLOR_GREY, string, string2);
return 1;
}
if(spawncar_gas[GetPlayerVehicleID(playerid)] == spawncar_gas_volume[GetPlayerVehicleID(playerid)])
{
format(string, sizeof(string), "Du kannst nichts Tanken, weil dein Tank voll ist.");
format(string2, sizeof(string2), "You can't fill your car, because you have max. gas.");
SendLanguageMessage(playerid, COLOR_GREY, string, string2);
return 1;
}
if(spawncar_gas_type[GetPlayerVehicleID(playerid)] == 7)
{
format(string, sizeof(string), "Du kannst mit diesem Fahrzeug nicht Tanken.");
format(string2, sizeof(string2), "You can't fill up this car.");
SendLanguageMessage(playerid, COLOR_GREY, string, string2);
return 1;
}
if(AccountInfo[playerid][aLanguage] == 2)
{
format(string2, sizeof(string2), "Gasoline ($%d)\nBenzin ($%d) \nSuper Plus ($%d) \nSuperBenzin ($%d) \nKersoin ($%d)",
GasStation[gs-1][gDieselPrice], GasStation[gs-1][gBenzinPrice], GasStation[gs-1][gSuperPlusPrice],
GasStation[gs-1][gSuperBenzinPrice], GasStation[gs-1][gKerosinPrice]);
ShowPlayerDialog(playerid, 4000, DIALOG_STYLE_LIST, "Gas Station - Fill Up", string2,"Accept","Cancel");
return 1;
}
else
{
format(string, sizeof(string), "Diesel ($%d)\nBenzin ($%d) \nSuper Plus ($%d) \nSuperBenzin ($%d) \nKersoin ($%d)",
GasStation[gs-1][gDieselPrice], GasStation[gs-1][gBenzinPrice], GasStation[gs-1][gSuperPlusPrice],
GasStation[gs-1][gSuperBenzinPrice], GasStation[gs-1][gKerosinPrice]);
ShowPlayerDialog(playerid, 4000, DIALOG_STYLE_LIST, "Tankstelle - Tanken", string,"Auswдhlen","Abbrechen");
return 1;
}
}
}//not connected
return 1;
}