13.05.2009, 15:07
Okay, so i wanted to make the Teleports only useable in Menu... this is what i've got so far.
Top
OnGameModeInit
OnPlayerSelectedMenuRow(playerid, row)...
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..
Top
pawn Код:
new Menu:TPM;
new Menu:TPS;
new Menu:TPL;
pawn Код:
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");
pawn Код:
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;
}