Teleport Menu Doesn't work correctly
#1

Hello.
I made a teleport menu, but if i choose drift and then drift 1 it teleports me in stunt place:
This is places:

Код:
if(dialogid == 613)
if(!response)
{
    ShowPlayerDialog(playerid, 612, DIALOG_STYLE_LIST, "Teleports", "Stunt\nDrift\nDrag\nDM\nJump\nParachute\nParkour\nRace\nCity\nOther Teles\n", "OK", "Close");
}
if(response)
{
	switch(listitem)
	{
	    case 0:
	    {
	    GameTextForPlayer(playerid, "San Fierro AirPort", 4000, 6);
			if (IsPlayerInAnyVehicle(playerid))
		{
            SetVehiclePos(GetPlayerVehicleID(playerid), -1385.0502, -313.3839, 27.3732);
        } else {
            SetPlayerPos(playerid, -1385.0502, -313.3839, 27.3732);
        }
	    }
	    case 1:
	    {
	    GameTextForPlayer(playerid, "Los Santos AirPort", 4000, 6);
			if (IsPlayerInAnyVehicle(playerid))
		{
            SetVehiclePos(GetPlayerVehicleID(playerid), 1977.9071, -2405.8396, 13.7146);
        } else {
            SetPlayerPos(playerid, 1977.9071, -2405.8396, 13.7146);
        }
	    }
	    case 2:
	    {
	    GameTextForPlayer(playerid, "Las Venturas AirPort", 4000, 6);
			if (IsPlayerInAnyVehicle(playerid))
		{
            SetVehiclePos(GetPlayerVehicleID(playerid), 1322.6737, 1289.6399, 13.1615);
        } else {
            SetPlayerPos(playerid, 1322.6737, 1289.6399, 13.1615);
        }
	    }
	    case 3:
	    {
	    GameTextForPlayer(playerid, "Las Venturas AirPort 2", 4000, 6);
			if (IsPlayerInAnyVehicle(playerid))
		{
            SetVehiclePos(GetPlayerVehicleID(playerid), 407.7527, 2521.2915, 17.0279);
        } else {
            SetPlayerPos(playerid, 407.7527, 2521.2915, 17.0279);
        }
	    }
	    case 4:
	    {
	    GameTextForPlayer(playerid, "Stunt", 4000, 6);
			if (IsPlayerInAnyVehicle(playerid))
		{
            SetVehiclePos(GetPlayerVehicleID(playerid), -205.8831, -108.6241, 4.8784);
        } else {
            SetPlayerPos(playerid, -205.8831, -108.6241, 4.8784);
        }
	    }
	    case 5:
	    {
	    GameTextForPlayer(playerid, "Mountain Chilliad", 4000, 6);
			if (IsPlayerInAnyVehicle(playerid))
		{
            SetVehiclePos(GetPlayerVehicleID(playerid), -2315.1956, -1642.7584, 486.9073);
        } else {
            SetPlayerPos(playerid, -2315.1956, -1642.7584, 486.9073);
        }
	    }
 	}
 	return 1;
}
Teleports:

Код:
////////////STUNT///////////////////STUNT MENU////////////////////////////////////////
if(dialogid == 613)
if(!response)
{
    ShowPlayerDialog(playerid, 612, DIALOG_STYLE_LIST, "Teleports", "Stunt\nDrift\nDrag\nDM\nJump\nParachute\nParkour\nRace\nCity\nOther Teles\n", "OK", "Close");
}
if(response)
{
	switch(listitem)
	{
	    case 0:
	    {
	    GameTextForPlayer(playerid, "San Fierro AirPort", 4000, 6);
			if (IsPlayerInAnyVehicle(playerid))
		{
            SetVehiclePos(GetPlayerVehicleID(playerid), -1385.0502, -313.3839, 27.3732);
        } else {
            SetPlayerPos(playerid, -1385.0502, -313.3839, 27.3732);
        }
	    }
	    case 1:
	    {
	    GameTextForPlayer(playerid, "Los Santos AirPort", 4000, 6);
			if (IsPlayerInAnyVehicle(playerid))
		{
            SetVehiclePos(GetPlayerVehicleID(playerid), 1977.9071, -2405.8396, 13.7146);
        } else {
            SetPlayerPos(playerid, 1977.9071, -2405.8396, 13.7146);
        }
	    }
	    case 2:
	    {
	    GameTextForPlayer(playerid, "Las Venturas AirPort", 4000, 6);
			if (IsPlayerInAnyVehicle(playerid))
		{
            SetVehiclePos(GetPlayerVehicleID(playerid), 1322.6737, 1289.6399, 13.1615);
        } else {
            SetPlayerPos(playerid, 1322.6737, 1289.6399, 13.1615);
        }
	    }
	    case 3:
	    {
	    GameTextForPlayer(playerid, "Las Venturas AirPort 2", 4000, 6);
			if (IsPlayerInAnyVehicle(playerid))
		{
            SetVehiclePos(GetPlayerVehicleID(playerid), 407.7527, 2521.2915, 17.0279);
        } else {
            SetPlayerPos(playerid, 407.7527, 2521.2915, 17.0279);
        }
	    }
	    case 4:
	    {
	    GameTextForPlayer(playerid, "Stunt", 4000, 6);
			if (IsPlayerInAnyVehicle(playerid))
		{
            SetVehiclePos(GetPlayerVehicleID(playerid), -205.8831, -108.6241, 4.8784);
        } else {
            SetPlayerPos(playerid, -205.8831, -108.6241, 4.8784);
        }
	    }
	    case 5:
	    {
	    GameTextForPlayer(playerid, "Mountain Chilliad", 4000, 6);
			if (IsPlayerInAnyVehicle(playerid))
		{
            SetVehiclePos(GetPlayerVehicleID(playerid), -2315.1956, -1642.7584, 486.9073);
        } else {
            SetPlayerPos(playerid, -2315.1956, -1642.7584, 486.9073);
        }
	    }
 	}
 	return 1;
}
/////////////////////DRIFTS////////////////////////DRIFTS//////////////////////////////////////////////////////////////////////////
if(dialogid == 6149)
if(!response)
{
    ShowPlayerDialog(playerid, 612, DIALOG_STYLE_LIST, "Teleports", "Stunt\nDrift\nDrag\nDM\nJump\nParachute\nParkour\nRace\nCity\nOther Teles\n", "OK", "Close");
}
if(response)
{
	switch(listitem)
	{
	    case 0:
	    {
		GameTextForPlayer(playerid, "DRIFT", 4000, 6);
		if (IsPlayerInAnyVehicle(playerid))
		{
            SetVehiclePos(GetPlayerVehicleID(playerid), -281.5930, 1552.6204, 76.4074);
        } else {
            SetPlayerPos(playerid, -281.5930, 1552.6204, 76.4074);
        }
	    }
	    case 1:
	    {
	    GameTextForPlayer(playerid, "DRIFT 2", 4000, 6);
			if (IsPlayerInAnyVehicle(playerid))
		{
            SetVehiclePos(GetPlayerVehicleID(playerid), -2516.9248, -612.0146, 134.4615);
        } else {
            SetPlayerPos(playerid, -2516.9248, -612.0146, 134.4615);
        }
	    }
	    case 2:
	    {
	    GameTextForPlayer(playerid, "DRIFT 3", 4000, 6);
			if (IsPlayerInAnyVehicle(playerid))
		{
            SetVehiclePos(GetPlayerVehicleID(playerid), 2276.4509, 1397.9180, 42.4562);
        } else {
            SetPlayerPos(playerid, 2276.4509, 1397.9180, 42.4562);
        }
	    }
 	}
 	return 1;
}
//////////////////DRAG//////////////////////DRAG/////////////////////////DRAG//////////////////////////////DRAG////////////////////
if(dialogid == 61551)
if(!response)
{
    ShowPlayerDialog(playerid, 612, DIALOG_STYLE_LIST, "Teleports", "Stunt\nDrift\nDrag\nDM\nJump\nParachute\nParkour\nRace\nCity\nOther Teles\n", "OK", "Close");
}
if(response)
{
	switch(listitem)
	{
	    case 0:
	    {
		    GameTextForPlayer(playerid, "DRAG", 4000, 6);
			if (IsPlayerInAnyVehicle(playerid))
		{
            SetVehiclePos(GetPlayerVehicleID(playerid), -2106.9265, 796.3030, 372.6379);
        } else {
            SetPlayerPos(playerid, -2106.9265, 796.3030, 372.6379);
        }
	    }
	    case 1:
	    {
	    GameTextForPlayer(playerid, "DRAG 1", 4000, 6);
			if (IsPlayerInAnyVehicle(playerid))
		{
            SetVehiclePos(GetPlayerVehicleID(playerid), 3080.9939, -610.7335, 9.4200);
        } else {
            SetPlayerPos(playerid, 3080.9939, -610.7335, 9.4200);
        }
	    }
	    case 2:
	    {
	    GameTextForPlayer(playerid, "DRAG 2", 4000, 6);
			if (IsPlayerInAnyVehicle(playerid))
		{
            SetVehiclePos(GetPlayerVehicleID(playerid), -2547.4941, 1602.0723, 7.0411);
        } else {
            SetPlayerPos(playerid, -2547.4941, 1602.0723, 7.0411);
        }
	    }
 	}
 	return 1;
}
Second code: This is a part of the code!
Reply
#2

try to check your cases again
Reply
#3

i've check them twice. Still got the problem.
Reply
#4

try ti change ur dialog to this:
[PAWN]
if(response)
{
switch(dialogid == id)
{
case 1:
{
switch(listitem)
{
//down hare You'r Cases

}
}
}
}
}
Reply
#5

pawn Код:
//if you want to make it with (!response)
if(!response) return ShowPlayerDialog(playerid, 612, DIALOG_STYLE_LIST, "Teleports", "Stunt\nDrift\nDrag\nDM\nJump\nParachute\nParkour\nRace\nCity\nOther Teles\n", "OK", "Close");
if(response)
{
    switch(dialogid == id)
    {
        case 1:
        {
            switch(listitem)
            {
                 //Down Hare Your Cases
            }
        }
     }
   }
}
Reply
#6

Still doesn't work.
Reply
#7

Problem is fixed. Was from if(!response).

Thanks for helping : )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)