Need help with this
#3

If they player exits the menu i want them to spawn about 1metre away from it

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if (pickupid == AirportIconLV)
    {
        ShowMenuForPlayer(AirportLV, playerid);
        TogglePlayerControllable(playerid, 0);
        SendClientMessage(playerid, COLOR_WHITE, "State your destination"); //
    }
    else if (pickupid == AirportIconAA)
    {
        ShowMenuForPlayer(AirportAA, playerid);
        TogglePlayerControllable(playerid, 0);
        SendClientMessage(playerid, COLOR_WHITE, "State your destination"); //
    }
    return 1;
}
pawn Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
  new Menu:current;
  current = GetPlayerMenu(playerid);
  if(current == AirportLV)
  {
    switch(row)
    {
      case 0:{
        SetPlayerPos(playerid, 401.5049,2529.6296,16.5724);
                SendClientMessage(playerid, 0xFFFF00FF, "Welcome to the Abandoned Airport.");
                GivePlayerMoney(playerid, -2000);
            TogglePlayerControllable(playerid, 1);
      }
    }
  }

  new Menu:current1;
  current1 = GetPlayerMenu(playerid);
  if(current1 == AirportAA)
  {
    switch(row)
    {
      case 0:{
        SetPlayerPos(playerid, 1697.8367,1451.0958,10.7688);
                SendClientMessage(playerid, 0xFFFF00FF, "Welcome to Las Ventures Airport.");
                GivePlayerMoney(playerid, -2000);
                TogglePlayerControllable(playerid, 1);
      }
    }
  }
    return 1;
}
pawn Код:
public OnPlayerExitedMenu(playerid)
{
    TogglePlayerControllable(playerid, 1);
    new Float:x, Float:y, Float:z;
    SetPlayerPos(playerid, x, y, z+1); //
    return 1;
}
Reply


Messages In This Thread
Need help with this - by ryan kirky - 17.03.2009, 17:21
Re: Need help with this - by hoodline - 17.03.2009, 17:40
Re: Need help with this - by ryan kirky - 17.03.2009, 17:43

Forum Jump:


Users browsing this thread: 2 Guest(s)