Naben,ich habe folgendes Problem:
Ich habe ein /help Menü als Dialog gemacht(DIALOG_STYLE_LIST) und es funktioniert ja auch so halbwegs nur wen man ein ListItem auswählt,
greift er zuzüglich noch auf andere Dialoge zu.Wieso?
Hier mal der Code vom /help system:
if(dialogid == msg)
{
if(response)
{
if(listitem == 0)
{
SendClientMessage(playerid,COLOR_WHITE,"/animlist /rules /stats /changepass /levelup /upgrade");
SendClientMessage(playerid,COLOR_WHITE,"/pay /charity /time /buy /kleidung(nur im BINCO) /resetupgrades(50k)");
SendClientMessage(playerid,COLOR_WHITE,"/report /cancel /accept /eject /usedrugs /contract /admins /me");
SendClientMessage(playerid,COLOR_WHITE,"/(s)chreien /inv");
}
if(listitem == 1)
{
SendClientMessage(playerid,COLOR_WHITE," /call /sms /togphone");
}
if(listitem == 2)
{
SendClientMessage(playerid,COLOR_WHITE," /carlock /carkey /carsell /carkeylock /givecarkey /parken /giveparkrights");
SendClientMessage(playerid,COLOR_WHITE," /carkeylock");
}
if(listitem == 3)
{
SendClientMessage(playerid,COLOR_WHITE," /invite /uninvite /giverank");
}
if(listitem == 4)
{
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
{
SendClientMessage(playerid, COLOR_YELLOW2, ":: LSPD :: (/r)adio (/d)epartments (/m)egaphone (/su)spect /mdc /arrest /duty /wanted (/cu)ff (/ta)zer /undercover /backup(/bk)");
SendClientMessage(playerid, COLOR_YELLOW2, ":: LSPD :: /frisk /friskinv /take /ticket (/gov)ernment /deliver /ram /swat /authorizeswat /deauthorizeswat /drag /copuntie");
SendClientMessage(playerid, COLOR_YELLOW2, ":: LSPD :: /backupclear(/bkc) /roadblock(/rb) /roadunblock(/rrb) /roadunblockall(/rrball) /showbadge /tracelastcall(/tlc) /weplicense");
}
if(PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 2)
{
SendClientMessage(playerid, COLOR_YELLOW2, ":: FBI :: (/r)adio (/d)epartments (/m)egaphone (/su)spect /mdc /arrest /duty /wanted (/cu)ff (/ta)zer /agent /showid /friskinv");
SendClientMessage(playerid, COLOR_YELLOW2, ":: FBI :: /frisk /take /ticket (/gov)ernment /deliver /ram /drag /copuntie /authorizetactical /deauthorizetactical /tactical");
}
if(PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 3)
{
SendClientMessage(playerid, COLOR_YELLOW2, ":: Military :: (/r)adio (/d)epartments (/m)egaphone (/su)spect /mdc /arrest /wanted (/cu)ff (/ta)zer");
SendClientMessage(playerid, COLOR_YELLOW2, ":: Military :: /frisk /friskinv /take /ticket (/gov)ernment /deliver /ram /drag /copuntie");
}
if(PlayerInfo[playerid][pLeader] == 17 || PlayerInfo[playerid][pMember] == 17)
{
SendClientMessage(playerid, COLOR_YELLOW2, "::Oamt:: /oticket /oamt(Taste: 2 o. N-Pad +)/tazer");
SendClientMessage(playerid, COLOR_YELLOW2, "::Mehr Befehle folgen!");
}
if(listitem == 5)
{
SendClientMessage(playerid,COLOR_WHITE," /abheben /einzahlen /stand(zeigt deinen Kontostand an)");
}
if(listitem == 6)
{
SendClientMessage(playerid,COLOR_WHITE,"Das Arbeitsamt ist derzeit noch in Bearbeitung!");
}
}
}
}
return 1;
}
Und hier der Code auf welche Dialoge er noch zugreift:
if(dialogid == adminmenu)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, adminkick, DIALOG_STYLE_MSGBOX, "Kick", "Spieler wirklich kicken?", "Ja", "Nein");
}
if(listitem == 1)
{
ShowPlayerDialog(playerid, adminban, DIALOG_STYLE_MSGBOX, "Spieler wirklich bannen?", "Bist du dir sicher?", "Ja", "Nein");
}
if(listitem == 2)
{
ShowPlayerDialog(playerid, adminheal, DIALOG_STYLE_MSGBOX, "Spieler wirklich healen?", "Bist du dir sicher?", "Ja", "Nein");
}
if(listitem == 3)
{
ShowPlayerDialog(playerid, adminkill, DIALOG_STYLE_MSGBOX, "Spieler wirklich killen?", "Bist du dir sicher?", "Ja", "Nein");
}
if(listitem == 4)
{
ShowPlayerDialog(playerid, adminarmo, DIALOG_STYLE_MSGBOX, "Spieler wirklich eine Weste geben?", "Bist du dir sicher?", "Ja", "Nein");
}
if(listitem == 5)
{
ShowPlayerDialog(playerid, adminmsg, DIALOG_STYLE_INPUT, "SERVER: Spieler Nachricht senden", " ", "Senden", "Abbrechen");
}
}
}
Ich hoffe mir kann jemand helfen bzw. ich hoffe mir kann jemand erklären woran es liegt.
Mfg
[FoR]Hardcore
P.s Das ganze passiert irgendwie immer wen ich einen neuen Dialog mache