#include <a_samp>
#include <zcmd>
new nyelv[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
ShowPlayerDialog(playerid,2165,DIALOG_STYLE_LIST,\"Válassz nyelvet!\\nChoose your language!\",\"Magyar / Hungary\\n English / Angol\",\"OK\",\"\");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 2165)
{
if(response == 1)
{
switch(listitem)
{
case 0:
{
nyelv[playerid] = 0; // 0 = magyar
SendClientMessage(playerid,0x00CC00AA,\"Magyar vagy!\");
}
case 1:
{
nyelv[playerid] = 1; // 1 = angol
SendClientMessage(playerid,0x00CC00AA,\"You\'re english!\");
}
}
}
else
{
ShowPlayerDialog(playerid,2165,DIALOG_STYLE_LIST,\"Válassz nyelvet!\\nChoose your language!\",\"Magyar / Hungary\\n English / Angol\",\"OK\",\"\");
}
return 1;
}
return 0;
}
CMD:help(playerid,params[])
{
if(nyelv[playerid] == 0) // ha magyar
{
SendClientMessage(playerid,0x00CC00AA,\"/parancsok\");
} else { // ha angol
SendClientMessage(playerid,0x00CC00AA,\"/commands\");
}
return 1;
}