// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#include <a_samp>
#include <colors>
new Language[MAX_PLAYERS];
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" Multi Language script betoltve\");
print(\" Keszitette: DrAkE\");
print(\"--------------------------------------\\n\");
return 1;
}
public OnFilterScriptExit()
{
print(\"\\n--------------------------------------\");
print(\" Multi Language script kiveve\");
print(\"--------------------------------------\\n\");
return 1;
}
public OnPlayerConnect(playerid)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,\"Choose a language\",\"Magyar\\r\\nEnglish\",\"Choose\", \"Cancel\");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(\"/teszt\", cmdtext, true, 10) == 0)
{
if(Language[playerid] == 0)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"Teszt sor!\");
return 1;
}
else if(Language[playerid] == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, \"Test script!\");
return 1;
}
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)//they pressed the first button
{
switch(listitem)//wich listitem is chosen
{
case 0:
{
Language[playerid] = 0;
}
case 1:
{
Language[playerid] = 1;
}
}
}
return 1;
}
Remélem megtudod csinálni ez alapján(ha több nyelvet akarsz akkor példa alapján létrehozod és a Language[playerid]nek több értéket is adhatsz pl Language[playerid] == 38 és akkor ahol akarod használni ott if(Language[playerid] == 38) .......)