Gamemode with 2 Languages Help!
#5

Quote:

enum pInfo
{
pLang1,
pLang2,
}
new PlayerInfo[MAX_PLAYERS][pInfo];

You can use single variable for it ?
pawn Код:
new Language[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
   Language[playerid] = 1// set a default language
   return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid==69)
    {
        case 1:
        {
            if(!response)
            {
                SendClientMessage(playerid,0xFF0000FF,"You didn't choose language!");
                SendClientMessage(playerid,0xFF0000FF,"So now you will be kick. | Reason: Didn't choose laguage.");
                Kick(playerid);
                return 1;
            }
            switch(listitem)
            {
                case 0:
                {
                    SendClientMessage(playerid,0xFF0000FF,"You selected language 1");
                    Language[playerid] = 1;
                }
                case 1:
                {
                    SendClientMessage(playerid,0xFF0000FF,"You selected language 2");
                    Language[playerid] = 2;
                }
            }
            return 1;
        }
   }
   return 1;

if(strcmp(cmd, "/minigames", true) == 0)
{
        if(Language[playerid] == 1)
        {
            ShowPlayerDialog(playerid, 656454, DIALOG_STYLE_MSGBOX, "Here is the text with language 1", "Ok", "" );
        }
        else if(Langauge[playerid] == 2)
        {
            ShowPlayerDialog(playerid, 656454, DIALOG_STYLE_MSGBOX, "Here is the text with language 2", "Ok", "" );
        }
}
Reply


Messages In This Thread
Gamemode with 2 Languages Help! - by HotPlayer - 17.10.2011, 09:32
Re: Gamemode with 2 Languages Help! - by nilanjay - 17.10.2011, 09:44
Re: Gamemode with 2 Languages Help! - by RoboN1X - 17.10.2011, 09:56
Re: Gamemode with 2 Languages Help! - by HotPlayer - 17.10.2011, 12:35
Re: Gamemode with 2 Languages Help! - by XFlawless - 17.10.2011, 12:37
Re: Gamemode with 2 Languages Help! - by SmiT - 17.10.2011, 12:41
Re: Gamemode with 2 Languages Help! - by HotPlayer - 17.10.2011, 14:01
Re: Gamemode with 2 Languages Help! - by HotPlayer - 17.10.2011, 16:58

Forum Jump:


Users browsing this thread: 2 Guest(s)