[Tutorial] How to make an order in several languages
#1

Hello, I will show you the easiest way (I think), how to make an order in several languages.

1.Add this variable.
Код:
enum OptiuniServer {
Limba };
new Option[OptiuniServer];
2.Now create command
Код:
	if(strcmp(cmd, "/cmdtest", true) == 0)
	{
		if(Option[Limba] ==1)SendClientMessage(playerid, 0xFFFFFFAA, "** Salut George ce faci?");else // Romanian
		if(Option[Limba] ==2)SendClientMessage(playerid, 0xFFFFFFAA, "** Hi Tom how are you?");else // English
		if(Option[Limba] ==3)SendClientMessage(playerid, 0xFFFFFFAA, "** Hola Xavi que passa?"); // Spanish 
                
		return 1;
	}
Now, I would recommend you to do when a player logs in, after i write the password to a dialog appears where you choose your language.
3.At the end OnPlayerLogin do so.
Код:
ShowPlayerDialog(playerid,1996,DIALOG_STYLE_LIST,"Limba/Language/Idioma","Romana\nEnghlis\nEspaГ±ol","Select", "");
4.Add to OnDialogResponse
Код:
		if(dialogid == 1996)
		{
			if(response)
			{
            	if(listitem == 0)
				{
                	Option[Limba] = 1;
                	SendClientMessage(playerid, 0xFFFFFFAA, "** Ai selectat limba romana.");
				}
				if(listitem == 1)
				{
			      	Option[Limba] = 2;
			      	SendClientMessage(playerid, 0xFFFFFFAA, "** You have selected enghlish language."); 
				}
				if(listitem == 2)
				{
			      	Option[Limba] = 3;
			      	SendClientMessage(playerid, 0xFFFFFFAA, "** Lengua espaГ±ola se ha seleccionado."); 
				}
			}
		}
So much was it ...
Reply


Messages In This Thread
How to make an order in several languages - by SkL_MD - 28.05.2012, 13:50
Re: How to make an order in several languages - by seanny - 28.05.2012, 17:19
Re : How to make an order in several languages - by mehdi-jumper - 28.05.2012, 17:45
Re: How to make an order in several languages - by MP2 - 28.05.2012, 21:28
Re: How to make an order in several languages - by [GF]Logic - 28.05.2012, 22:26
Re: Re : How to make an order in several languages - by 2KY - 28.05.2012, 23:30
Re: How to make an order in several languages - by Jonny5 - 29.05.2012, 00:30
Re: How to make an order in several languages - by TheArcher - 01.06.2012, 17:18

Forum Jump:


Users browsing this thread: 1 Guest(s)