Gamemode with 2 Languages Help!
#1

Hello all,
i want to make my server with 2 languages
i founded a script from samp forums.
I created them 2 languages and i give you the script.
Here its it:
1. 2 Languages as info:
Код:
enum pInfo
{
    pLang1,
    pLang2,
}
new PlayerInfo[MAX_PLAYERS][pInfo];
2.A connect Dialog:
Код:
ShowPlayerDialog(playerid,69,DIALOG_STYLE_LIST,"Select your language","Language1\nLanguage2","Select","Cancel");
3.Languages Dialog Response:
Код:
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");
                    PlayerInfo[playerid][pLang1] =1;
                }
                case 1:
                {
                	SendClientMessage(playerid,0xFF0000FF,"You selected language 2");
                    PlayerInfo[playerid][pLang2] =1;
                }
            }
            return 1;
        }
   }
   return 1;
4. And here its 1 of my commands with these 2 languages :
Код:
	if(strcmp(cmd, "/minigames", true) == 0)
	{
		if(PlayerInfo[playerid][pLang1] == 1)
		{
		    ShowPlayerDialog(playerid, 656454, DIALOG_STYLE_MSGBOX, "Here is the text with language 1", "Ok", "" );
		}
		else if(PlayerInfo[playerid][pLang2] == 1)
		{
		    ShowPlayerDialog(playerid, 656454, DIALOG_STYLE_MSGBOX, "Here is the text with language 2", "Ok", "" );
		}
	}
All of my comands have this type [Example 4]!
So i have tried more than 4 methods to fix it and if i join in my server, no one of commands its work.
Why?
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: 1 Guest(s)