Ich habe versucht ein Menü zu scripten aber irgendwie haut es nicht hin.
Ich finde den fehler einfach nicht kann mir einer helfen? bitte
#include <a_samp>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
//======================NEW MENÜ================================================
new Menu:test0;
new Menu:teste0;
new Menu:shaft;
//==================AddMenu=====================================================
public OnGameModeInit()
{
AddStaticPickup(1273,2,2498.187255,-1644.023803,13.782609);//Pickup Id 0;
test0 = CreateMenu("test0", 2, 50, 200, 41, 30);
AddMenuItem(shaft,0,"1");
AddMenuItem(shaft,0,"2");
AddMenuItem(shaft,0,"3");
AddMenuItem(shaft,0,"4");
AddMenuItem(shaft,0,"5");
AddMenuItem(shaft,0,"6");
teste0 = CreateMenu("teste0", 1,50,200,50,25);
AddMenuItem(shaft,0,"code");
AddMenuItem(shaft,0,"code1");
AddMenuItem(shaft,0,"Verlassen");
return 1;
}
//================Pickups=======================================================
public OnPlayerPickUpPickup(playerid, pickupid)
{
if ( pickupid == 0 ){
ShowMenuForPlayer(test0,playerid);
TogglePlayerControllable(playerid,0);}
return 1;
}
//===============MenuRow========================================================
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:Current = GetPlayerMenu(playerid);
if (Current == test0) {
switch(row) {
case 0: {
DestroyCurrentMenu(playerid);
OnInfo(playerid,0);
OnInfo(playerid,0);
DestroyCurrentMenu(playerid);
TogglePlayerControllable(playerid,1);}
return 1;
}
//===============ExitMenu=======================================================
public OnPlayerExitedMenu(playerid)
{
new Menu:Current = GetPlayerMenu(playerid);
if( Current == test0){
TogglePlayerControllable(playerid,1);}
if( Current == test0){
}
}
}
return 1;
}
//==============================================================================