new string[128];
format(string,sizeof(string),"%s",Text_GetPlayerText("WEAPSSLOTS",playerid));
ShowPlayerDialog(playerid, WEAPSMENU, DIALOG_STYLE_LIST, Text_GetPlayerText("WEAPSINFO",playerid), string, "Ok", "Esc");
ShowPlayerDialog(playerid, WEAPSMENU, DIALOG_STYLE_LIST, Text_GetPlayerText("WEAPSINFO",playerid), Text_GetPlayerText("WEAPSSLOTS",playerid), "Ok", "Esc");
WEAPSSLOTS = Armas de Mano [Espacio 1]\nEscopetas [Espacio 2]\nMetralletas [Espacio 3]\nSubfusiles [Espacio 4]\nRifles [Espacio 5]
Armas de Mano [Espacio 1]\nEscopetas [Espacio 2]\nMetralletas [Espacio 3]\nSubfusiles [Espacio 4]\nRifles [Espacio 5]
Armas de Mano [Espacio 1] Escopetas [Espacio 2] Metralletas [Espacio 3] Subfusiles [Espacio 4] Rifles [Espacio 5]
WEAPSSLOTS = Armas de Mano [Espacio 1]\r\nEscopetas [Espacio 2]\r\nMetralletas [Espacio 3]\r\nSubfusiles [Espacio 4]\r\nRifles [Espacio 5]
Armas de Mano [Espacio 1]\r\Escopetas [Espacio 2]\r\Metralletas [Espacio 3]\r\Subfusiles [Espacio 4]\r\Rifles [Espacio 5]
hey thanks for the answer amm the result is the same thing only change the \n for \r\
Код:
Armas de Mano [Espacio 1]\r\Escopetas [Espacio 2]\r\Metralletas [Espacio 3]\r\Subfusiles [Espacio 4]\r\Rifles [Espacio 5] |
stock Text_DoNL(string[])
{
for (new i = 0, j = strlen (string); i != j; ++i)
{
if (string[i] == '\\' && string[i + 1] == 'n') string[i] = '\r', string[i + 1] = '\n';
}
}
ShowPlayerDialog(playerid, WEAPSMENU, DIALOG_STYLE_LIST, Text_GetPlayerText("WEAPSINFO",playerid), Text_DoNL(Text_GetPlayerText("WEAPSSLOTS",playerid)), "Ok", "Esc");