MultiLanguage System [ENG/BALKAN]
#1

Hello Everyone.
Well, I'm a bit stucked with this...
I'd appreciate any help you can give me.

This is my problem. I think i did everything correctly, but check it out. I'm trying to make multilanguage system, which I made...but, i have no idea how to save this variable into ini file with y_ini. Can you help me? I'd appreciate any help. Thanks in advance. Here's my code so far:

PHP код:
#include <a_samp>//include1
#include <ZCMD>//include2
#define DIALOG_LANGUAGE 1 //dialog for choosing the language
#define ENG 0 //english language
#define BAL 1//balkan language
new pLanguage[MAX_PLAYERS char];//variable that needs to be saved
stock SendLanguageMessage(playeridcolorleng[], lbal[])//sending language messages with the simplified way.
{
    switch(
GetPlayerLanguage(playerid))
    {
         case 
ENG:SendClientMessage(playeridcolorleng);
         case 
BAL:SendClientMessage(playeridcolorlbal);
    }
    return 
1;
}
stock GetPlayerLanguage(playerid
{
    return 
pLanguage{playerid};
}
public 
OnPlayerConnect(playerid)
{
     
pLanguage{playerid} = ENG;
     
//code..bla bla
     
ShowPlayerDialog(playerid,DIALOG_LANGUAGE,DIALOG_STYLE_MSGBOX,"Language","Please choose your Language!","English","Balkan");
     return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
            case 
DIALOG_LANGUAGE: {
                switch(
response) {
                    case 
0: {
                        
SendClientMessage(playerid, -1"You selected the English(ENG) language, now messages will be written in English");
                           
pLanguage{playerid} = ENG;
                        return 
1;
                    }
                    case 
1: {
                        
SendClientMessage(playerid, -1"Izabrao si Balkanski(BAL) jezik, tvoje poruke ce sada biti na Balkanskom.");
                        
pLanguage{playerid} = BAL;
                        return 
1;
                    }
                }
                return 
1;
            }
    }
    return 
1;
}
CMD:help(playeridparams[])//just a test
{
    
SendLanguageMessage(playerid, -1"Help Center""Centar Za Pomoc");
    return 
1;

Reply


Messages In This Thread
MultiLanguage System [ENG/BALKAN] - by Mrki_Drakula - 17.12.2011, 16:39
Re: MultiLanguage System [ENG/BALKAN] - by Tigerkiller - 17.12.2011, 16:59
Re: MultiLanguage System [ENG/BALKAN] - by Mrki_Drakula - 17.12.2011, 17:02
Re: MultiLanguage System [ENG/BALKAN] - by Tigerkiller - 17.12.2011, 17:09
Re: MultiLanguage System [ENG/BALKAN] - by Mrki_Drakula - 17.12.2011, 17:09
Re: MultiLanguage System [ENG/BALKAN] - by Tigerkiller - 17.12.2011, 17:17
Re: MultiLanguage System [ENG/BALKAN] - by Mrki_Drakula - 17.12.2011, 17:20
Re: MultiLanguage System [ENG/BALKAN] - by Mrki_Drakula - 17.12.2011, 18:26
Re: MultiLanguage System [ENG/BALKAN] - by PlayHard - 17.12.2011, 18:30
Re: MultiLanguage System [ENG/BALKAN] - by Mrki_Drakula - 17.12.2011, 18:35

Forum Jump:


Users browsing this thread: 1 Guest(s)