Jump to content

micsko17

Members
  • Posts

    6
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by micsko17

  1. 41 minutes ago, [BC]VACEDA[NWD] said:

    this does not work for servers with more than 1 player, try this:

    
    mp.events.addCommand("veh", (player, text) => {
      if (text == undefined) {
        player.veh = mp.vehicles.new(mp.joaat("T20"), player.position);
        player.putIntoVehicle(player.veh, -1);
      } else {
        player.veh = mp.vehicles.new(mp.joaat(text), player.position);
        player.putIntoVehicle(player.veh, -1);
      }
    });

     

    Thanks for Quick reply. Will try tomorrow. I also noted that once I entered the same type of car the code worked at the following run.

    for example:

    I run: /veh luxor - wont put me inside, but I do manually get in.

    then I run /veh luxor again and it works

  2. mp.events.addCommand("veh", (player, text) => {
      if (text == undefined) {
        let veh = mp.vehicles.new(mp.joaat("T20"), player.position);
        player.putIntoVehicle(veh, -1);
      } else {
        let veh = mp.vehicles.new(mp.joaat(text), player.position);
        player.putIntoVehicle(veh, -1);
      }
    });

    I am using this simple script. When I execute veh command it creates the vehicle, but the player is not inside.

×
×
  • Create New...