Hi, i have a strange problem with a dialog.
Код:
//at the top
#define NUMERO_INTERIORS 19
//variables:
enum InteriorsEnum
{
nome[128],
interiorID,
Float:X,
Float:Y,
Float:Z
}
new Interiors[][InteriorsEnum] =
{
{"Casa 1", 0, 295.2160,1473.7689,1080.2578},
{"Areoporto", 0, 2107.6116,-2536.1816,13.5469},
{"Liquor Store Blueberry", 0,253.9632,-69.8224,1.4327},
{"Swat Training 1", 0, 1297.5359,1361.2479,10.8203},
{"Swat Training 2", 0, 1297.5359,1361.2479,10.8203},
{"Test di guida", 0, 1484.5923,1181.2201,10.8203},
{"Poligono di tiro", 0, 58.2060,1887.7686,17.6406},
{"24/7 1", 17, -25.884498,-185.868988,1003.546875},
{"24/7 2", 10, 6.091179,-29.271898,1003.549438},
{"Jefferson motel", 15, 2215.454833,-1147.475585,1025.796875},
{"Mattatoio", 1, 963.418762,2108.292480,1011.030273},
{"Ufficio Postale", 3, 384.808624,173.804992,1008.382812},
{"Area 51",0, 223.431976,1872.400268,13.734375},
{"Casa di Madd Dogg", 5, 1267.663208,-781.323242,1091.906250},
{"Fabbrica del Crack", 2,2543.462646,-1308.379882,1026.728393},
{"Casa del colonnello Furhberger", 8,2807.619873,-1171.899902,1025.570312},
{"Magazzino vuoto",18,1302.519897,-1.787510,1001.028259},
{"Las Venturas PD",3, 288.745971,169.350997,1007.171875}
};
//the command
COMMAND:teleports(playerid, params[])
{
new string[1500];
SendClientMessage(playerid, COLORE_GIALLO, "DEBUG");
for(new x; x<NUMERO_INTERIORS;x++)
{
SendClientMessage(playerid, COLORE_GIALLO, "DEBUG FOR");
format(string, sizeof(string), "%s%s\n",string, Interiors[x][nome]);
}
SendClientMessage(playerid, COLORE_GIALLO, "DEBUG DIA");
ShowPlayerDialog(playerid, DIALOGO_TELEPORTS, DIALOG_STYLE_LIST, "Teletrasporti", string, "OK", "Annulla");
return 1;
}
I inserted those three SendClientMessage only for debugging, because i want to understand what part of the function is running and what isn't.
But no "DEBUG DIA" or any dialog showing up.
Previously, the script runned... but then, i modified something i don't remember, and all screwed up.
you only have 18 elements.
Thank you very much Jonny you helped me a lot! I'll pay more attention next time