17.12.2011, 20:02
(
Последний раз редактировалось Tigerkiller; 17.12.2011 в 21:10.
)
Hello Community. Iam here to show/realease my second include ever.
with it you can choose languages and send some messages to other peoples
Important: You have to put LoadDialog(playerid,dialogid,response,listitem); under OnPlayerDialogResponse
Functions:
to add more languages like rom and more
It is my second include but i hope you like it
My old include doesent work and had some Bugs so i remade it
For Questions ask me!
Dowload: Click here
Pastebin: Here
Example:
with it you can choose languages and send some messages to other peoples
pawn Код:
native GetPlayerLanguage(playerid);
native SetPlayerLanguage(playerid,Language[]);
native SendLanguageMessage(playerid,color,English,German);
native ShowPlayerLanguageDialog(playerid);
native LoadDialog(playerid,dialogid,response,listitem);
Functions:
pawn Код:
GetPlayerLanguage(playerid); give you the current language from the player.
Example: new language = GetPlayerLanguage(playerid);
SetPlayerLanguage(playerid,language); Set The Languge of a player
Example: SetPlayerLanguage(playerid,German);
SendLanguageMessage(playerid,color,English,German);
Example: SendLanguageMessage(playerid,0xFF0000FF,"English Text","German Text");
ShowPlayerLanguageDialog(playerid); will show a dialog to choose language
pawn Код:
1. Open Language.inc
2. add under Defines #define YourLanguage and a number like 1065
3. go to ShowPlayerLanguageDialog and add you language in a new line
4. go to LoadDialog(); and add a new case with your langugage
5. click on save and have fun.
My old include doesent work and had some Bugs so i remade it
For Questions ask me!
Dowload: Click here
Pastebin: Here
Example:
pawn Код:
#include <a_samp>
#include <Language>
public OnFilterScriptInit()
{
print("--------------------------------------");
print(" Test Multi Language");
print("--------------------------------------");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
ShowPlayerLanguageDialog(playerid);
return 1;
}
public OnPlayerSpawn(playerid)
{
SendLanguageMessage(playerid,0xFF0000FF,"Your Language are English","Deine Sprache ist deutsch!");
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
LoadDialog(playerid, dialogid, response, listitem);
return 1;
}