Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Snippet Showroom => Topic started by: MatheuS on March 29, 2014, 04:17:19 am

Title: [Include] Language
Post by: MatheuS on March 29, 2014, 04:17:19 am
Hello, here I am sharing my scripts
My first include

download the here include
Clicky (http://www.solidfiles.com/d/c875c8d536/Language.inc)

Functions

GetPlayerLanguage(playerid);
SetPlayerLanguage(playerid,language);
SendLanguageMessage(playerid,color,english[],portuguese[]);
SendLanguageMessageToAll(color,english[],portuguese[]);

Examples

Code: [Select]
public OnPlayerCommandText( playerid, cmdtext[] )
{
if ( strcmp( cmd, "pt", true ) == 0 )
{
SendClientMessage(playerid, -1, "His language was changed to Portuguese");
SetPlayerLanguage(playerid,Portuguese);
return 1;
}
else if ( strcmp( cmd, "en", true ) == 0 )
{
SendClientMessage(playerid, -1, "His language was changed to English");
SetPlayerLanguage(playerid,English);
return 1;
}
else if ( strcmp( cmd, "language", true ) == 0 )
{
SendLanguageMessage(playerid,-1,"His language is English","Sua linguagem e Portuguese");
return 1;
}
else if ( strcmp( cmd, "languageall", true ) == 0 )
{
SendLanguageMessageToAll(-1,"Welcome","Bem Vindos");
return 1;
}
    return 0;
}

Credits: Me

Any error or doubt post here

Sorry for my english
Title: Re: [Include] Language
Post by: dynavolt71 on March 29, 2014, 01:09:22 pm
Sounds Great :). I nevermind about this ideas ;)
Title: Re: [Include] Language
Post by: NeskWriter on March 29, 2014, 04:54:55 pm
I though you posted a built-in translator
Title: Re: [Include] Language
Post by: MatheuS on March 29, 2014, 06:57:13 pm
I though you posted a built-in translator

maybe in the future  ;D