Hi
I have rode:
http://wiki.alliedmods.net/Menu_API_...9#Translations
But this isnt work.
My code:
Code:
public Pokaz_Menu(Handle:menu, MenuAction:action, client, param2)
{
/* If an option was selected, tell the client about the item. */
if(Client_IsIngame(client))
{
if (action == MenuAction_Select)
{
if (glosy[client] == -1)
{
if (param2 == 0)
{
new glos = GetRandomInt(0, GetArraySize(nazwy_kampani) -1);
decl String:Wylosowana_Kampania[1064];
GetArrayString(nazwy_kampani, glos, Wylosowana_Kampania, sizeof(Wylosowana_Kampania));
PrintToChat(client, "\x04[AZK]\x03%t \x04%s", "Wylosowano", Wylosowana_Kampania);
SetArrayCell(kampania_punkty, glos, GetArrayCell(kampania_punkty, glos) + 1);
glosy[client] = glos;
}
else if (param2 >= 1)
{
new glos = param2 - 1;
decl String:Zaglosowano_Na[1064];
GetArrayString(nazwy_kampani, glos, Zaglosowano_Na, sizeof(Zaglosowano_Na));
PrintToChat(client, "\x04[AZK]\x03%t \x04%s", "Zaglosowano", Zaglosowano_Na);
SetArrayCell(kampania_punkty, glos, GetArrayCell(kampania_punkty, glos) + 1);
glosy[client] = glos;
}
}
else
{
decl String:Zaglosowano_Na[1064];
GetArrayString(nazwy_kampani, glosy[client], Zaglosowano_Na, sizeof(Zaglosowano_Na));
PrintToChat(client, "\x04[AZK]\x03%t \x04%s", "Oddano", Zaglosowano_Na);
}
}
else if (action == MenuAction_Display)
{
if (param2 == 0)
{
decl String:display[128];
GetMenuItem(menu, param2, "", 0, _, display, sizeof(display));
decl String:buffer[255];
FormatEx(buffer, sizeof(buffer), "%t", display, client);
RedrawMenuItem(buffer);
PrintToChat(client, "Zmieniono: %s %s", display, buffer);
}
}
else if (action == MenuAction_Cancel)
{
if (glosy[client] == -1)
{
new tryb = CheckGameMode(GameMode)
if (tryb == COOP || tryb == VERSUS)
{
PrintToChat(client, "%t %s", "Musisz2", NowaMapa);
}
else
{
PrintToChat(client, "%t %s", "Musisz", NowaMapa);
}
}
}
/* If the menu has ended, destroy it */
else if (action == MenuAction_End)
{
CloseHandle(menu);
}
}
}
I wont translate first param and title but i cant
I can see in game name of translation. Btw. look at this:
Code:
else if (action == MenuAction_Display) { if (param2 == 0) { decl String:display[128]; GetMenuItem(menu, param2, "", 0, _, display, sizeof(display)); decl String:buffer[255]; FormatEx(buffer, sizeof(buffer), "%t", display, client); RedrawMenuItem(buffer); PrintToChat(client, "Zmieniono: %s %s", display, buffer); } }
@edit:
I found answer here:
http://forums.alliedmods.net/showthr...nu+translation
This theard should be close.