Wenn ich /navi eingebe, erscheint im Navigation Menu 1 der erste Menüpunkt Drogendealer aus dem Navigation Menu 2.
Im Navigation Menu 2 wird der Menüpunkt Drogendealer nicht angezeigt.
Was mache ich falsch ?
#include <a_samp>
new Menu:navi1;
new Menu:navi2;
new Menu:navi3;
#define COLOR_RED 0xAA3333AA
#define COLOR_GREEN 0x33AA33AA
public OnFilterScriptInit() {
}
public OnFilterScriptExit() {
}
public OnGameModeInit()
{
navi1=Menu:CreateMenu("~w~Navigation Menu 1",1,130,150,300);
AddMenuItem(navi1,0," ADAC LS"); //0
AddMenuItem(navi1,0," ADAC LV"); //1
AddMenuItem(navi1,0," ADAC SF"); //2
AddMenuItem(navi1,0," Biker"); //3
AddMenuItem(navi1,0," Biker-Shop"); //4
AddMenuItem(navi1,0," Boot-Job"); //5
AddMenuItem(navi1,0," Taxifahrer LS"); //6
AddMenuItem(navi1,0," Taxifahrer LV"); //7
AddMenuItem(navi1,0," Post LS"); //8
AddMenuItem(navi1,0," Post LV"); //9
AddMenuItem(navi1,0," Post SF"); //10
AddMenuItem(navi1,0," Navigation Menu 2"); //11
navi2=Menu:CreateMenu("~w~Navigation Menu 2",1,130,150,300);
AddMenuItem(navi1,0," Drogendealer"); //0
AddMenuItem(navi2,0," navi 2");
AddMenuItem(navi2,0," navi 3");
AddMenuItem(navi2,0," navi 4");
navi3=Menu:CreateMenu("~w~Navigation Menu 3",1,130,150,300);
AddMenuItem(navi3,0," navi 1");
AddMenuItem(navi3,0," navi 2");
AddMenuItem(navi3,0," navi 3");
AddMenuItem(navi3,0," navi 4");
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:Now;
Now = GetPlayerMenu(playerid);
if(Now == navi1) {
TogglePlayerControllable(playerid,false);
ShowMenuForPlayer(navi1,playerid);
switch(row)
{
case 0: {
SetPlayerCheckpoint(playerid,-79.9094,-1135.0229,1.0781,5); // ADAC LS
ShowMenuForPlayer(navi1, playerid);
}
case 1: {
SetPlayerCheckpoint(playerid,1886.0837,2339.3083,10.8203,5); // ADAC LV
ShowMenuForPlayer(navi1, playerid);
}
case 2: {
SetPlayerCheckpoint(playerid,-2226.6082,286.9214,35.3203,5); // ADAC SF
ShowMenuForPlayer(navi1, playerid);
}
case 3: {
SetPlayerCheckpoint(playerid,504.8405,-69.1731,998.7578,5); // BIKER PICKUP
ShowMenuForPlayer(navi1, playerid);
}
case 4: {
SetPlayerCheckpoint(playerid,2131.8550,-1150.1294,24.1917,5); // Biker Shop
ShowMenuForPlayer(navi1, playerid);
}
case 5: {
SetPlayerCheckpoint(playerid,-2190.0911,2414.0591,5.1563,5); // BOOT JOB
ShowMenuForPlayer(navi1, playerid);
}
case 6: {
SetPlayerCheckpoint(playerid,1771.2418,-1907.2025,13.5552,5); // Taxi HQ LS
ShowMenuForPlayer(navi1, playerid);
}
case 7: {
SetPlayerCheckpoint(playerid,1947.2200,2068.9106,10.8203,5); // Taxi LV
ShowMenuForPlayer(navi1, playerid);
}
case 8: {
SetPlayerCheckpoint(playerid,1117.9919,-1249.7778,15.9281,5); // Post LS
ShowMenuForPlayer(navi1, playerid);
}
case 9: {
SetPlayerCheckpoint(playerid,1680.8837,1760.2552,10.8285,5); // Post LV
ShowMenuForPlayer(navi1, playerid);
}
case 10: {
SetPlayerCheckpoint(playerid,-2522.6191,1214.9878,37.4283,5); // Post SF
ShowMenuForPlayer(navi1, playerid);
}
case 11: {
ShowMenuForPlayer(navi2, playerid);
}
}
}
if(Now==navi2) {
TogglePlayerControllable(playerid,false);
ShowMenuForPlayer(navi2,playerid);
switch(row)
{
case 0: {
SetPlayerCheckpoint(playerid,-2699.8394,1604.5452,3.2188,5); // DROGEN PICKUP
ShowMenuForPlayer(navi1, playerid);
}
case 1: {
SendClientMessage(playerid,COLOR_RED,"Menu 2 navi 2");
}
case 2: {
SendClientMessage(playerid,COLOR_RED,"Menu 2 navi 3");
}
case 3: {
SendClientMessage(playerid,COLOR_RED,"Menu 2 navi 4");
}
}
}
if(Now==navi3) {
TogglePlayerControllable(playerid,true);
switch(row) {
case 0: {
SendClientMessage(playerid,COLOR_RED,"Menu 3 navi 1");
}
case 1: {
SendClientMessage(playerid,COLOR_RED,"Menu 3 navi 2");
}
case 2: {
SendClientMessage(playerid,COLOR_RED,"Menu 3 navi 3");
}
case 3: {
SendClientMessage(playerid,COLOR_RED,"Menu 3 navi 4");
}
}
}
return 1;
}
public OnPlayerSpawn(playerid)
{
}
public OnGameModeExit()
{
DestroyMenu(navi1);
DestroyMenu(navi2);
DestroyMenu(navi3);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/navi", true)) {
ShowMenuForPlayer(navi1, playerid);
return 1;
}
return 0;
}