10.10.2006, 11:33
CHANGING LANGUAGE IN-GAME:
This allow you to change the language in-game by typing the shortcut of the language, can be really useful
At the begining of the script:
In OnPlayerConnect
Languages commands:
Example command for the HELP:
Easy no? Enjoy the multilanguage
Ps: sorry for the deutch traduction, i use a translator
This allow you to change the language in-game by typing the shortcut of the language, can be really useful
At the begining of the script:
pawn Code:
new Language[MAX_PLAYERS] = 0; //initialyse with the default language = english
pawn Code:
SendClientMessage(playerid,0xC0C0C0FF,"Please choose a language : /en - /fr - /de (default is EN)");
pawn Code:
if(strcmp(cmdtext,"/en",true) == 0)
{
Language[playerid] = 0;
SendClientMessage(playerid,0xC0C0C0FF,"You choose the english language.");
return 1;
}
else if(strcmp(cmdtext,"/fr",true) == 0)
{
Language[playerid] = 1;
SendClientMessage(playerid,0xC0C0C0FF,"Tu as choisis le langage francais.");
return 1;
}
else if(strcmp(cmdtext,"/de",true) == 0)
{
Language[playerid] = 2;
SendClientMessage(playerid,0xC0C0C0FF,"Du hast die deutsche Sprache gewдhlt.");
return 1;
}
pawn Code:
else if((strcmp(cmdtext,"/help",true) == 0)||
(strcmp(cmdtext,"/aide",true) == 0)||
(strcmp(cmdtext,"/hilfe",true) == 0))
{
switch (Language[playerid])
{
case 0:
{
SendClientMessage(playerid,0xFFD400AA,"HELP:");
SendClientMessage(playerid,0xFFD400AA,"Type /lock to close your vehicle.");
SendClientMessage(playerid,0xFFD400AA,"Type /unlock to open your vehicle.");
}
case 1:
{
SendClientMessage(playerid,0xFFD400AA,"AIDE:");
SendClientMessage(playerid,0xFFD400AA,"Tape /lock pour fermer ton vehicule.");
SendClientMessage(playerid,0xFFD400AA,"Tape /unlock pour ouvrir ton vehicule.");
}
case 2:
{
SendClientMessage(playerid,0xFFD400AA,"HILFE:");
SendClientMessage(playerid,0xFFD400AA,"Tippt /lock, um dein vehicule zu schlieЯen.");
SendClientMessage(playerid,0xFFD400AA,"Tippt /unlock, um dein vehicule zu erцffnen.");
}
}
return 1;
}
Easy no? Enjoy the multilanguage
Ps: sorry for the deutch traduction, i use a translator