Little help please? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Little help please? (
/showthread.php?tid=222188)
Little help please? -
Janek17 - 06.02.2011
Welcome to how to make such a system is that when a player joins the server, then he can choose between the two languages that he wants such as the Estonian and English Language
Re: Little help please? -
xRyder - 06.02.2011
Well, first you will need to make your GM in two languages. (commands and so on...)
And when you do that, you'll be able to make a system when someone joins to your server he can choose which language he wants to use.
Re: Little help please? -
Janek17 - 06.02.2011
But how do make that system?
Re: Little help please? -
-Rebel Son- - 06.02.2011
Use a dialog i guess, with the selections of the languages, then when they select the language, Format all the text to use that language.
Re: Little help please? -
Janek17 - 06.02.2011
I don't know how do to that!
Re: Little help please? -
xRyder - 06.02.2011
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:
pawn Код:
ShowPlayerDialog(playerid, 1,DIALOG_STYLE_LIST, "Choose your language.","English\nEstonian", "Choose","");
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:
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;
}
This is just rough example.
Re: Little help please? -
-Rebel Son- - 06.02.2011
Ouch, Well. look in the wiki for a Dialog guide, Then When you learn that, Simply do as ryder said, make a diffrent language for your server. Then when they select that choice for the language, Foward that to the player.