17.10.2011, 09:32
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:
2.A connect Dialog:
3.Languages Dialog Response:
4. And here its 1 of my commands with these 2 languages :
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?
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];
Код:
ShowPlayerDialog(playerid,69,DIALOG_STYLE_LIST,"Select your language","Language1\nLanguage2","Select","Cancel");
Код:
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;
Код:
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", "" );
}
}
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?



