new Menu:TPM;
new Menu:TPS;
new Menu:TPL;
TPM = CreateMenu("Teleports", 2, 50.0, 180.0, 200.0, 200.0);
AddMenuItem(TPM, 0, "-");
AddMenuItem(TPM, 1, "Stunts");
AddMenuItem(TPM, 0, "-");
AddMenuItem(TPM, 1, "Locations");
TPS = CreateMenu("Teleports - Stunts", 2, 50.0, 180.0, 200.0, 200.0);
AddMenuItem(TPS, 0, "Big");
AddMenuItem(TPS, 1, "Jump");
AddMenuItem(TPS, 0, "Big");
AddMenuItem(TPS, 1, "Jump");
AddMenuItem(TPS, 0, "Amazing");
AddMenuItem(TPS, 1, "Jump");
TPL = CreateMenu("Teleports - Locations", 2, 50.0, 180.0, 200.0, 200.0);
AddMenuItem(TPL, 0, "Mount");
AddMenuItem(TPL, 1, "Chilliad");
AddMenuItem(TPL, 0, "Otto's");
AddMenuItem(TPL, 1, "Carpark");
AddMenuItem(TPL, 0, "Wang");
AddMenuItem(TPL, 1, "Cars");
AddMenuItem(TPL, 0, "Jizzy's");
AddMenuItem(TPL, 1, "Club");
AddMenuItem(TPL, 0, "Wheel Arch");
AddMenuItem(TPL, 1, "Angels");
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:current;
current = GetPlayerMenu(playerid);
if(current == TPM)
{
switch(row)
{
case 0:
{
ShowMenuForPlayer(TPS,playerid);
}
case 1:
{
ShowMenuForPlayer(TPL,playerid);
}
}
if(current == TPS)
{
switch(row)
{
case 0:
{
SetPlayerPos(playerid,1122.145020, -2576.983398, 313.387695);
}
case 1:
{
SetPlayerPos(playerid,2682.959961, -2606.618408, 499.154022);
}
case 2:
{
SetPlayerPos(playerid,-1339.989502, -362.349243, 3505.428711);
}
}
if(current == TPL)
{
switch(row)
{
case 0:
{
SetPlayerPos(playerid,-2379.5391,-1613.2455,497.6486);
}
case 1:
{
SetPlayerPos(playerid,-1635.6250,1203.2758,7.1797);
}
case 2:
{
SetPlayerPos(playerid,-1990.4949,289.1101,34.1410);
}
case 3:
{
SetPlayerPos(playerid,-2623.9255,1409.7347,7.0938);
}
case 4:
{
SetPlayerPos(playerid,-2694.4810,217.2300,4.1797);
}
}
}
}
}
return 1;
}
Originally Posted by иєσz
Whats wrong?
|
Ok so, here is the problem, when i try to do this, the menus pop up fine and such, but the commands does not work.. it doesnt teleport.. |
if(current == TPM)
{
if(current == TPM)
{
if(current == TPS)
{
Originally Posted by Andom
Found it.
pawn Код:
So actually you have now: pawn Код:
|
Originally Posted by Mikkel
Quote:
|
Originally Posted by Andom
Quote:
|
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:current;
current = GetPlayerMenu(playerid);
if(current == TPM)
{
switch(row)
{
case 0:
{
ShowMenuForPlayer(TPS,playerid);
}
case 1:
{
ShowMenuForPlayer(TPL,playerid);
}
}
}
if(current == TPS)
{
switch(row)
{
case 0:
{
SetPlayerPos(playerid,1122.145020, -2576.983398, 313.387695);
}
case 1:
{
SetPlayerPos(playerid,2682.959961, -2606.618408, 499.154022);
}
case 2:
{
SetPlayerPos(playerid,-1339.989502, -362.349243, 3505.428711);
}
}
}
if(current == TPL)
{
switch(row)
{
case 0:
{
SetPlayerPos(playerid,-2379.5391,-1613.2455,497.6486);
}
case 1:
{
SetPlayerPos(playerid,-1635.6250,1203.2758,7.1797);
}
case 2:
{
SetPlayerPos(playerid,-1990.4949,289.1101,34.1410);
}
case 3:
{
SetPlayerPos(playerid,-2623.9255,1409.7347,7.0938);
}
case 4:
{
SetPlayerPos(playerid,-2694.4810,217.2300,4.1797);
}
}
}
return 1;
}