Problem with teleportmenu and teleporting with car...
#1

Hi,
i made a teleportmenu a few days ago. It worked well since I noticed, that if i am in a vehicle it happens nothing. So i tried to implement this option.
This is the call for the menu:
Код:
  if(strcmp(cmdtext, "/teleport", true) == 0)
		{
		if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
			{
  		ShowMenuForPlayer(teleportmenu2, playerid);
  		}
		else
		{ShowMenuForPlayer(teleportmenu, playerid);
		return 1;
		}}
The teleportmenu is the normal menu if i am not in a vehicle... this still works. The teleportmenu2 is the menu which is called if i am in a vehicle:
Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
  new Menu:CurrentMenu = GetPlayerMenu(playerid);
	if(CurrentMenu == teleportmenu2)
	{
  switch(row)
  {
    new v = GetPlayerVehicleID(playerid);
    case 0: // GROVE STREET (LS)
    {
    SetVehiclePos(v, 2492.1934,-1667.5109,13.3438);
    PutPlayerInVehicle(playerid, v, 0);
    	SendClientMessage(playerid, 0xFFFFFFFF, "Willkommen in der Grovestreet");
    	ResetPlayerWeapons(playerid);
    	GivePlayerWeapon(playerid, 22,300);
    	GivePlayerWeapon(playerid, 28,1000);
	GivePlayerWeapon(playerid, 26,200);
  	SetPlayerArmour(playerid,0);
    ResetPlayerMoney(playerid);
	GivePlayerMoney(playerid, 100000);
		}
		
	case 1: // BEACH (LS)
    {
    SetVehiclePos(v, 369.4351,-2046.1688,7.6719);
    PutPlayerInVehicle(playerid, v, 0);
    	SendClientMessage(playerid, 0xFFFFFFFF, "Willkommen am Santa Maria: Beach");
    	ResetPlayerWeapons(playerid);
    	GivePlayerWeapon(playerid, 22,300);
    	GivePlayerWeapon(playerid, 28,1000);
	GivePlayerWeapon(playerid, 26,200);
  	SetPlayerArmour(playerid,0);
	ResetPlayerMoney(playerid);
	GivePlayerMoney(playerid, 100000);
    	    }}}}
The problem is if I am in any vehicle and type /teleport, it opens the teleportmenu2 but i cant choose an option with spacebar. When i press spacebar it happens nothing, it only works if i press "W". But I dont know why. Can someone please help me?

PS.: Sorry for bad english, Iґm german. Hope i could explain it understandable =)
Reply


Messages In This Thread
Problem with teleportmenu and teleporting with car... - by VayaConTioz - 23.06.2009, 14:44
Re: Problem with teleportmenu and teleporting with car... - by pen_theGun - 23.06.2009, 15:25
Re: Problem with teleportmenu and teleporting with car... - by VayaConTioz - 23.06.2009, 15:42
Re: Problem with teleportmenu and teleporting with car... - by Grim_ - 23.06.2009, 15:45
Re: Problem with teleportmenu and teleporting with car... - by VayaConTioz - 23.06.2009, 16:06

Forum Jump:


Users browsing this thread: 2 Guest(s)