06.02.2011, 21:51
Hmm.. Let's say your using dini to save all the player info and those things.
Make a variable inside PlayerInfo enumeration ( eg. 'pLanguage').
Than a something like dialog or what you want under OnPlayerConnect() or if you have your own function.
Something like:
And than you need to make some code under OnDialogResponse()
So, when player chooses one of those languages you can save it with dini in his file.
And when he wants to use some command (eg. /help) you will need to make something like:
This is just rough example.
Make a variable inside PlayerInfo enumeration ( eg. 'pLanguage').
Than a something like dialog or what you want under OnPlayerConnect() or if you have your own function.
Something like:
pawn Код:
ShowPlayerDialog(playerid, 1,DIALOG_STYLE_LIST, "Choose your language.","English\nEstonian", "Choose","");
So, when player chooses one of those languages you can save it with dini in his file.
And when he wants to use some command (eg. /help) you will need to make something like:
pawn Код:
COMMAND:help(playerid, params[])
{
if(PlayerInfo[playerid][pLanguage] == 1)//This is if he choose englis
{
//code...
}
else if(PlayerInfo[playerid][pLanguage] == 2)//This is if he choose estonian
{
//code...
}
return 1;
}