Help Teleport
#2

You have made a logical mistake. Whenever the player types /lv, the SetVehiclePos code is executed. Whenever the player types a command that is not recognized, the SetPlayerPos code is executed. You have no check in place to see whether or not the player is currently in a car.

The problem is probably made more clear by using proper indenting of your code: (this is not a fix, just the same code with good indenting)

Код:
  if(strcmp(cmd, "/lv", true) == 0)
  {
    SetVehiclePos(GetPlayerVehicleID(playerid), 2030.837158, 1343.022338, 10.415551);
    GameTextForPlayer(playerid, "~b~Las Venturas", 3000, 3);
  }
  else
  {
    SetPlayerPos(playerid,2030.837158, 1343.022338, 10.415551);
    GameTextForPlayer(playerid, "~b~Las Venturas", 3000, 3);
  }
  return 1;
}
Reply


Messages In This Thread
Help Teleport - by gunit_j - 04.02.2009, 12:18
Re: Help Teleport - by trc_ - 04.02.2009, 12:41
Re: Help Teleport - by gunit_j - 04.02.2009, 12:59

Forum Jump:


Users browsing this thread: 2 Guest(s)