dialog problems
#1

ok, I was just wondering why my dialogs have problems switching to next menu.

the dialog ID's aren't repeated...is it possible because I didn't use this function switch(dialogid)?
Reply
#2

Can you show the code please?
Reply
#3

pawn Код:
if(dialogid == TELEPORTS)
    {
        if(response)
        {
            if(listitem == 0)
            {
                SetPlayerPos(playerid, -2236.57, -1714.34, 480.88);
                SetPlayerFacingAngle(playerid, 90);
                SendClientMessage(playerid, COLOR_YELLOW, "Welcome to Mt. Chilliad");
            }
            if(listitem == 1)
            {
                SetPlayerPos(playerid, -310.50, 1538.00, 75.56);
                SetPlayerFacingAngle(playerid, 180);
                SendClientMessage(playerid, COLOR_YELLOW, "Welcome to Big Ear");
            }
            if(listitem == 2)
            {
                SetPlayerPos(playerid, -733.67, 2043.84, 60.39);
                SetPlayerFacingAngle(playerid, 180);
                SendClientMessage(playerid, COLOR_YELLOW, "Welcome to The Sherman Dam");
            }
            if(listitem == 3)
            {
                SetPlayerPos(playerid, -1487.70, 2608.59, 55.84);
                SetPlayerFacingAngle(playerid, 180);
                SendClientMessage(playerid, COLOR_YELLOW, "Welcome to El Qualbrados");
            }
            if(listitem == 4)
            {
                SetPlayerPos(playerid, -2704.27, 217.08, 4.18); //Wheel Arch Angles (Facing West)
                SetPlayerFacingAngle(playerid, 90);
                SendClientMessage(playerid, COLOR_YELLOW, "Welcome to Wheel Arch Angels");
            }
            if(listitem == 5)
            {
                SetPlayerPos(playerid, 1565.27, -1359.12, 330.06); //LS Tower Jump (Facing East)
                SetPlayerFacingAngle(playerid, 270);
                SendClientMessage(playerid, COLOR_YELLOW, "Welcome to LS Tower Jump");
                GivePlayerWeapon(playerid, 46, 1);
            }
            if(listitem == 6)
            {
                SetPlayerPos(playerid, 2509.25, -1671.27, 13.38); //Grove Street (Facing West)
                SetPlayerFacingAngle(playerid, 90);
                SendClientMessage(playerid, COLOR_YELLOW, "Welcome to Grove Street");
            }
            if(listitem == 7)
            {
                SetPlayerPos(playerid, 2029.06, 1007.16, 10.92); //Four Dragons (Facing West)
                SetPlayerFacingAngle(playerid, 90);
                SendClientMessage(playerid, COLOR_YELLOW, "Welcome to The Four Dragons");
            }
            if(listitem == 8)
            {
                SetPlayerPos(playerid, 2083.35, 1683.32, 10.82); //Caligula's Casino (Facing East)
                SetPlayerFacingAngle(playerid, 270);
                SendClientMessage(playerid, COLOR_YELLOW, "Welcome to Caligula's Casino");
            }
            if(listitem == 9)
            {
                SetPlayerPos(playerid, 2029.72, 1921.56, 12.31); //The Visage (Facing East)
                SetPlayerFacingAngle(playerid, 90);
                SendClientMessage(playerid, COLOR_YELLOW, "Welcome to The Visage");
            }
            if(listitem == 10)
            {
                SetPlayerPos(playerid, 2127.08, 2333.81, 11.74); //Emerald Isle (Facing North)
                SetPlayerFacingAngle(playerid, 0);
                SendClientMessage(playerid, COLOR_YELLOW, "Welcome to Emerald Isle");
            }
            if(listitem == 11)
            {
                SetPlayerPos(playerid, 1688.63, 1448.03, 10.77); //Las Venturas Airport (Facing West)
                SetPlayerFacingAngle(playerid, 90);
                SendClientMessage(playerid, COLOR_YELLOW, "Welcome to Las Venturas Airport");
            }
            if(listitem == 12)
            {
                SetPlayerPos(playerid, 1724.89, -2411.26, 13.55); //Los Santos Airport(Facing South)
                SetPlayerFacingAngle(playerid, 180);
                SendClientMessage(playerid, COLOR_YELLOW, "Welcome to Los Santos Airport");
            }
            if(listitem == 13)
            {
                SetPlayerPos(playerid, -1368.79, -244.80, 14.14); //San Fierro Airport(Facing East)
                SetPlayerFacingAngle(playerid, 270);
                SendClientMessage(playerid, COLOR_YELLOW, "Welcome to San Fierro Airport");
            }
        }
    }
thats my teleport code, I have another like it, so should I use switch(dialogid)?
Reply
#4

In CMD, make dialog name as a number, example TELEPORT will be 1

Then if(dialogid == 1 && response)

And that should do the trick.
Reply
#5

k, I'll try.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)