Gerne zeige ich euch mehr Code.
enum HotelSystemEnum
{
ID,
Name[50],
Float:posx,
Float:posy,
Float:posz,
Miete,
ev,
Float:ex,
Float:ey,
Float:ez,
Float:ea,
Interior,
VW,
MaxPlaetze,
vPlaetze,
Inhaber[MAX_PLAYER_NAME],
Kasse
}
new Hotelsysa[][HotelSystemEnum] = {
{1, "Hotel1", 1726.9811,-1637.0074,20.2174, 450, 1, 1726.9230,-1639.0986,20.2236,179.5752, 18, 1, 18, 0, "kein Besitzer", 0},
{2, "Hotel2", 1249.7089,-905.7025,42.8828, 450, 0, 0.0,0.0,0.0,0.0, 0, 0, 8, 0, "kein Besitzer", 0},
{3, "Hotel3", 1245.6139,-874.9651,42.8828, 450, 0, 0.0,0.0,0.0,0.0, 0, 0, 8, 0, "kein Besitzer", 0},
{4, "Hotel4", 1287.6498,-900.3723,42.8828, 450, 0, 0.0,0.0,0.0,0.0, 0, 0, 8, 0, "kein Besitzer", 0},
{5, "Hotel5", 1284.3822,-871.9836,43.0490, 450, 0, 0.0,0.0,0.0,0.0, 0, 0, 8, 0, "kein Besitzer", 0}
};
//navi funktion
new teststring[1000];
new hotelstring[300];
new test = 18;
for(new i=1; i<=sizeof(Hotelsysa); i++) {
format(hotelstring, sizeof(hotelstring), "%sFreie Plätze: %d/%d", Hotelsysa[i][Name], Hotelsysa[i][vPlaetze], Hotelsysa[i][MaxPlaetze]);
strcat(teststring, hotelstring, sizeof(hotelstring));
SendClientMessage(playerid, Rot, hotelstring); //zum testen
}
SendClientMessage(playerid, Grün, hotelstring); //zum testen
ShowPlayerDialog(playerid, STADTPLAN_HOTELS, DIALOG_STYLE_LIST, "Hotels", teststring, "Ok", "Abbruch");
Alles anzeigen