Multilanguage help
#1

Hello!
I want to make a multi language option in my server.I tryed many times but it isnt working properly.Can anyone please help me to script this ?
Thanks.
Reply
#2

What exactly doesnt working properly ? Any errors ? post them with script lines
Reply
#3

no error.I used this FS http://forum.sa-mp.com/showthread.ph...=Multilanguage
I made a setlang cmd, in which 3 langs ( Usage /setlang [laguage 1-3] )
when i type setlang 1 or 2 or 3 . language is not changing.When i type something , same thing will come in the chat
Reply
#4

This will help you https://sampforum.blast.hk/showthread.php?tid=259662
Reply
#5

But i need russian language. How can i make russian lang?
Reply
#6

Starting of GM
pawn Код:
#define DIALOG_LANGUAGE 334
new Language[MAX_PLAYERS];
OnPlayerConnect

pawn Код:
ShowPlayerDialog(playerid, DIALOG_LANGUAGE, DIALOG_STYLE_LIST, "Select a Language", "English\nItaliano\nFranзaise\nDeutsch\nAnd on...
In the case of DIALOG_LANGUAGE under OnDialogResponse

pawn Код:
Language[playerid] = listitem;
Function

pawn Код:
SendMessage(playerid, color, english[], italian[], french[], german[]/*Add more if you want*/)
{
  switch(Language[playerid])
  {
    case 0: SendClientMessage(playerid, color, english);
    case 1: SendClientMessage(playerid, color, italian);
    case 2: SendClientMessage(playerid, color, french);
    case 3: SendClientMessage(playerid, color, german);
    default: SendClientMessage(playerid, color, english); //else
  }
  return 1;
}

Untested code.
Reply
#7

I did the same thing that shows in tut
but it shows these errors
pawn Код:
C:\Documents and Settings\Ironboy\Desktop\0.3c package\SATDM v13 Latest\filterscripts\lang.pwn(33) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Ironboy\Desktop\0.3c package\SATDM v13 Latest\filterscripts\lang.pwn(55) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Warnings.
This is the code
pawn Код:
#include <a_samp>
#include <zcmd>
#define LANG_ENGLISH 0
#define LANG_GERMAN 1
// And so on, make sure you increase that number after the language, so 0, 1, 2, 3... It's the language id.
#define LANG_DIALOG 666 // Put any number here, but make sure there isn't same dialog ID anywhere in the script.
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif
public OnPlayerConnect(playerid)
{
    ShowPlayerDialog( playerid, LANG_DIALOG, DIALOG_STYLE_LIST, "Pick your language", "English\nGerman", "Choose" ); // Shows the dialog to pick your language upon connecting...
    return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
    return 1;
}
CMD:mylang( playerid, params[ ] ) {
    if( GetPVarInt( playerid, "Language" ) == LANG_ENGLISH ) {
        SendClientMessage( playerid, -1, "Your picked language is English. " );
    }
    else if( GetPVarInt( playerid, "Language" ) == LANG_GERMAN ) {
        SendClientMessage( playerid, -1, "Ihre abgeholt Sprache ist Deutsch." ); // ****** again.
    }
    return 1;
}

public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) {
    if( dialogid == LANG_DIALOG ) {
        if( !response )
            return ShowPlayerDialog( playerid, LANG_DIALOG, DIALOG_STYLE_LIST, "Pick your language", "English\nGerman", "Choose" ); // So he can't exit the dialog without choosing the language.
        if( listitem == 0 ) { // If you picked English...
            SetPVarInt( playerid, "Language", LANG_ENGLISH ); // Sets your language to English.
            SendClientMessage( playerid, -1, "You have choosen English as your language!" );
        }
        if( listitem == 1 ) { // If you picked German...
            SetPVarInt( playerid, "Language", LANG_GERMAN ); // Sets your language to German.
            SendClientMessage( playerid, -1, "Sie haben ausgewдhlt Deutsch als Ihre Sprache!" ); // Translated with ****** Translate :p...
        }
    }
    return 1;
}
Reply
#8

Please help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)