Dein Fehler ist dass du das einfach irgendwo unvollständig raus kopiert hast, das erkennt man daran dass dort die Funktion DestroyCurrentMenu verwendet wird die nirgends definiert ist. Das ist auch keine standard SA-MP Funktion.
Hier mal dein Menü wie es funktionieren müsste:
#include <a_samp>
new Menu:gMenu[MAX_PLAYERS];
new gCurrentMenu;
main() {
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
public OnGameModeInit() {
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnPlayerRequestClass(playerid, classid) {
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[]) {
if (strcmp(cmdtext, "/m1", true)==0) {
gMenu[playerid] = CreateMenu("test0", 2, 50, 200, 41, 30);
AddMenuItem(gMenu[playerid],0,"1");
AddMenuItem(gMenu[playerid],0,"2");
AddMenuItem(gMenu[playerid],0,"3");
AddMenuItem(gMenu[playerid],0,"4");
AddMenuItem(gMenu[playerid],0,"5");
AddMenuItem(gMenu[playerid],0,"6");
gCurrentMenu = 1;
return 1;
}
if (strcmp(cmdtext, "/m2", true)==0) {
gMenu[playerid] = CreateMenu("teste0", 1,50,200,50,25);
AddMenuItem(gMenu[playerid],0,"code");
AddMenuItem(gMenu[playerid],0,"code1");
AddMenuItem(gMenu[playerid],0,"Verlassen");
gCurrentMenu = 2;
return 1;
}
return 0;
}
public OnPlayerSelectedMenuRow(playerid, row) {
new txt[256];
format (txt, sizeof txt, "Menü: %d; Zeile: %d", gCurrentMenu, row);
SendClientMessage(playerid, 0xFF0000FF, txt);
DestroyMenu(gMenu[playerid]);
return 1;
}
public OnPlayerExitedMenu(playerid) {
DestroyMenu(gMenu[playerid]);
return 1;
}