Problem with my menu
#1

I made a checkpoint, it opens a menu when you walk into it. Menu is a skydive teleport menu, when I select San Fierro Airport it goes back up to Mt Chilliad without moving it... I don't know what's wrong, here is the video.

http://www.xfire.com/video/2bb066/

You see the rest is working fine. When I stand outside of the checkpoint it's not moving somehow (menu item).
Reply
#2

Hmm, hard to find a problem when you haven't posted your code with that here.

I would maybe suggest to use dialogs, it's the nice mouse-based GUI's (https://sampwiki.blast.hk/wiki/How_to_Create_a_Dialog)
Looks more nice, and it shouldn't be any problems with it
Reply
#3

Quote:
Originally Posted by Blt950
Hmm, hard to find a problem when you haven't posted your code with that here.

I would maybe suggest to use dialogs, it's the nice mouse-based GUI's (https://sampwiki.blast.hk/wiki/How_to_Create_a_Dialog)
Looks more nice, and it shouldn't be any problems with it
I can post my menu script but I where do you think the problem is in?

No, I prefer menu's. :P
Reply
#4

Okey, you prefer menus.

Well, where the problem is aren't easy to say. So paste all related to that menu here. And errors/warnings if you get some while complying.
Reply
#5

Quote:
Originally Posted by Blt950
Well, where the problem is aren't easy to say. So paste all related to that menu here. And errors/warnings if you get some while complying.
I have no errors or warnings when compiling my gamemode. I'll post part of my menu script (items).

Btw, when I walk into the checkpoint (no freeze, so I can move), it goes up, but when I walk away when Menu shows up, it suddenly doesn't move, I think that's a problem.
Reply
#6

Quote:
Originally Posted by DarkPhoenix
Quote:
Originally Posted by Blt950
Well, where the problem is aren't easy to say. So paste all related to that menu here. And errors/warnings if you get some while complying.
I have no errors or warnings when compiling my gamemode. I'll post part of my menu script (items).

Btw, when I walk into the checkpoint (no freeze, so I can move), it goes up, but when I walk away when Menu shows up, it suddenly doesn't move, I think that's a problem.
Could be the problem yea.

Waiting for you to paste code...
Reply
#7

Quote:
Originally Posted by Blt950
Quote:
Originally Posted by DarkPhoenix
Quote:
Originally Posted by Blt950
Well, where the problem is aren't easy to say. So paste all related to that menu here. And errors/warnings if you get some while complying.
I have no errors or warnings when compiling my gamemode. I'll post part of my menu script (items).

Btw, when I walk into the checkpoint (no freeze, so I can move), it goes up, but when I walk away when Menu shows up, it suddenly doesn't move, I think that's a problem.
Could be the problem yea.

Waiting for you to paste code...
What you want to see? Checkpoint or menu (items)?
Reply
#8

Quote:
Originally Posted by DarkPhoenix
Quote:
Originally Posted by Blt950
Quote:
Originally Posted by DarkPhoenix
Quote:
Originally Posted by Blt950
Well, where the problem is aren't easy to say. So paste all related to that menu here. And errors/warnings if you get some while complying.
I have no errors or warnings when compiling my gamemode. I'll post part of my menu script (items).

Btw, when I walk into the checkpoint (no freeze, so I can move), it goes up, but when I walk away when Menu shows up, it suddenly doesn't move, I think that's a problem.
Could be the problem yea.

Waiting for you to paste code...
What you want to see? Checkpoint or menu (items)?
Both would be fine
Reply
#9

Quote:
Originally Posted by Blt950
Quote:
Originally Posted by DarkPhoenix
Quote:
Originally Posted by Blt950
Quote:
Originally Posted by DarkPhoenix
Quote:
Originally Posted by Blt950
Well, where the problem is aren't easy to say. So paste all related to that menu here. And errors/warnings if you get some while complying.
I have no errors or warnings when compiling my gamemode. I'll post part of my menu script (items).

Btw, when I walk into the checkpoint (no freeze, so I can move), it goes up, but when I walk away when Menu shows up, it suddenly doesn't move, I think that's a problem.
Could be the problem yea.

Waiting for you to paste code...
What you want to see? Checkpoint or menu (items)?
Both would be fine
pawn Код:
skydive = CreateMenu("Skydive", 2, 200.0, 100.0, 150.0, 150.0);
    AddMenuItem(skydive, 0, "Mount Chilliad");
    AddMenuItem(skydive, 0, "San Fierro Airport");
pawn Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:CurrentMenu = GetPlayerMenu(playerid);
if(CurrentMenu == skydive)
{
  switch(row)
  {
    case 0: //Mount Chilliad
    {
      SetPlayerPos(playerid, -2339.8967,-1718.8793,1410.9595);
            ResetPlayerWeapons(playerid);
      GivePlayerWeapon(playerid, 46, 1);
    }
    case 1: //San Fierro Airport
    {
      SetPlayerPos(playerid,-1277.2825,-135.0260,1880.6472);
      GivePlayerWeapon(playerid, 46, 1);
        }
  }
}
return 1;
}
Checkpoint:
pawn Код:
public rangeCheck(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 50.0, -1422.1245,-288.1826,14.1484))
    {
    playerCheckpoint[playerid] = SetPlayerCheckpoint(playerid,-1422.1245,-288.1826,14.1484, 3.1);
    }
    else
    {
      DisablePlayerCheckpoint(playerid);
    }
    return 1;
}
Reply
#10

It maybe happens because you move yes..

Try to do like this:

You have the 2 options, but when the player get the menu up. Freeze the player (TogglePlayerControllable(playerid,0);)

And make 1 more option named "Exit" that unfreezes the player (TogglePlayerControllable(playerid,1);)

Not sure that will work, but try.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)