public OnPlayerExitedMenu(playerid)
{
TogglePlayerControllable(playerid, 1);
return 1;
}
Wieso wird man, wenn dann ein Menü verlässt, nicht entfreezt?
public OnPlayerExitedMenu(playerid)
{
TogglePlayerControllable(playerid, 1);
return 1;
}
Wieso wird man, wenn dann ein Menü verlässt, nicht entfreezt?
hmm frag mal ab ob er auch das jeweilige Menü hat
du meinst,
if(CurrentMenu == BEISPIEL)
?
Wie soll ich ihn dann unfreezen?
Außerdem, ich möchts ja allgemein haben, also wenn man irgendein Menü verlässt, soll man ungefreezt werden.
Was ich lustig find, normal sollte es ja gehen da ich diesen Code bei mir in meinem GM auch drinne habe
Mhh..
Vll. hilft dir das weiter`?
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:CurrentMenu = GetPlayerMenu(playerid);
if(CurrentMenu == dmmenu)
{
switch(row)
{
case 0:
{
new rand = random(sizeof(gArenaRandomPlayerSpawns));
SetPlayerPos(playerid, gArenaRandomPlayerSpawns[rand][0], gArenaRandomPlayerSpawns[rand][1], gArenaRandomPlayerSpawns[rand][2]);
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100.0);
GivePlayerWeapon(playerid,30,500);
GivePlayerWeapon(playerid,33,200);
GivePlayerWeapon(playerid,22,200);
dm = 1;
}
case 1:
{
//SetPlayerPos
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100.0);
dm = 1;
}
case 2:
{
//SetPlayerPos
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100.0);
dm = 1;
}
case 3:
{
//SetPlayerPos
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100.0);
dm = 1;
}
case 4:
{
//SetPlayerPos
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100.0);
dm = 1;
}
case 5:
{
//SetPlayerPos
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100.0);
dm = 1;
}
case 6:
{
//SetPlayerPos
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100.0);
dm = 1;
}
case 7:
{
ShowMenuForPlayer(dmmenu2, playerid);
}
case 8:
{
HideMenuForPlayer(dmmenu, playerid);
}
}
}
else if(CurrentMenu == dmmenu2)
{
switch(row)
{
case 0:
{
//SetPlayerPos
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100.0);
ResetPlayerWeapons(playerid);
dm = 1;
}
case 1:
{
//SetPlayerPos
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100.0);
ResetPlayerWeapons(playerid);
dm = 1;
}
case 2:
{
//SetPlayerPos
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100.0);
ResetPlayerWeapons(playerid);
dm = 1;
}
case 3:
{
//SetPlayerPos
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100.0);
ResetPlayerWeapons(playerid);
dm = 1;
}
case 4:
{
//SetPlayerPos
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100.0);
ResetPlayerWeapons(playerid);
dm = 1;
}
case 5:
{
//SetPlayerPos
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100.0);
ResetPlayerWeapons(playerid);
dm = 1;
}
case 6:
{
//SetPlayerPos
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100.0);
ResetPlayerWeapons(playerid);
dm = 1;
}
case 7:
{
ShowMenuForPlayer(dmmenu, playerid);
}
case 8:
{
HideMenuForPlayer(dmmenu2, playerid);
}
}
}
return 1;
}
public OnPlayerExitedMenu(playerid)
{
TogglePlayerControllable(playerid, true);
return 1;
}
mach bei jeden case außer bei Show/Hide Menu ein toggleplayercontrollable(1); rein
Das wüsste ich ja auch! Aber wenn ich mehrere Menüs habe, ist das scheiße anstrengent bzw. viel.