Hey hab grad eine sprachauswahl hinzugefügt und funktioniert auch aber wenn man die sprache ausgewählt hat öffnet der ein anderen dialog
hier mal der code:
bei OnPlayerConnect
ShowPlayerDialog(playerid,0,DIALOG_STYLE_LIST,"Choose your Language!","Deutsch\r\nEnglish\r\nRussian(coming soon)","Choose!", "Kick!");
dann bei OnDialogResponse
if(dialogid == 0)
{
if(response)
{
if(listitem == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "Du hast die deutsche sprache ausgewählt!");
SetPlayerLanguage(playerid, 1);
SetTimerEx("Tutorial", 1000, false, "i", playerid);
LoadProject(playerid, "TD.tde");
}
if(listitem == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "You´ve choosed the english language!");
SetPlayerLanguage(playerid, 2);
SetTimerEx("Tutorial", 1000, false, "i", playerid);
LoadProject(playerid, "TD.tde");
}
if(listitem == 2)
{
SetPlayerLanguage(playerid, 3);
SendClientMessage(playerid, COLOR_WHITE, "You´ve choosed the russian language!(coming soon)");
SetTimerEx("Tutorial", 1000, false, "i", playerid);
LoadProject(playerid, "TD.tde");
}
}
else
{
Kick(playerid);
SendClientMessage(playerid, COLOR_RED, "it was your decision!");
}
return 1;
}
aber wenn man die sprache ausgewählt hat öffnet der den dialog:
(müsste der sein glaub ich)
if(response == 1) PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0); // Confirmation sound
else PlayerPlaySound(playerid, 1084, 0.0, 0.0, 0.0); // Cancelation sound
switch(dialogid)
{
case 0: // First dialog.
{
if(response) // If he pressed accept.
{
strmid(CurrentProject, "", 0, 1, 128);
if(listitem == 0) // He pressed new project.
ShowTextDrawDialog(playerid, 1);
else if(listitem == 1) // He pressed load project.
ShowTextDrawDialog(playerid, 2, 1);
else if(listitem == 2) // He pressed delete project.
ShowTextDrawDialog(playerid, 2, 2);
}
else pData[playerid][P_Editing] = false;
}
case 1: // New Project
{
if(response)
{
//...