How to deny EmpyrionTeleporter teleport player when he is driving

Discussion in 'Empyrion API' started by 晕dows, Apr 23, 2023.

  1. 晕dows

    晕dows Ensign

    Joined:
    Apr 10, 2023
    Messages:
    9
    Likes Received:
    2
    Recently I was downsizing the EmpyrionTeleporter plugin
    When testing the teleportation function,
    it was found that when the player is driving the CV, but does not move
    The CV will be teleported to the destination with the player
    Is there a way to deny teleportation to players who are driving?
    Or How to get driving status so I can deny it myself
     
    #1
  2. imlarry425

    imlarry425 Captain

    Joined:
    Jan 10, 2019
    Messages:
    462
    Likes Received:
    340
    It's available under Eleon.Modding.IStructure ... check out the .Pilot property and the .GetPassengers() function for who is coming along for the ride. The gen'd docs are in /Content/Extras/ModdingDoc ... Hope that helps!
     
    #2
  3. 晕dows

    晕dows Ensign

    Joined:
    Apr 10, 2023
    Messages:
    9
    Likes Received:
    2
    So
    I should find all CV in current playfield first
    then check which CV 's Pilot is Player
    but I remember ASTIC says Request_GlobalStructure_List is no longer supported by the API of the dedicated server and have to be programmed by a DB query directly.
    but how to query? is there any demo?
     
    #3
    Last edited: Apr 24, 2023
  4. Taelyn

    Taelyn Administrator Staff Member Community Manager

    • Developer
    • Administrator
    Joined:
    Oct 4, 2021
    Messages:
    895
    Likes Received:
    1,252
    There plenty of guides on the internet that explain how to access a SQLite Database
    Astic wrote his self already a mod that gets this data out of the DB, you just have to look it up and implement it in your mod without
    having to access the DB or write something for it, as ASTIC does this in his own tool already
     
    #4
    Germanicus likes this.
  5. 晕dows

    晕dows Ensign

    Joined:
    Apr 10, 2023
    Messages:
    9
    Likes Received:
    2
    thx
    I just found properties CurrentStructure and DrivingEntity in Iplayer
    I'll try this first,if it can use,then I dont need to query DB
    otherwise i will go to try DB way
    I dont like write sql in program...
    couse I am a java programer
    C language is already difficult for me
     
    #5
    Taelyn likes this.

Share This Page