MRT Posted March 11, 2018 Share Posted March 11, 2018 *deleted because my contributions are offensive to developer* Link to comment Share on other sites More sharing options...
Hammelpilaw Posted March 12, 2018 Share Posted March 12, 2018 It seems this is hard coded, but at least there is a way to change this. This will return the error message "You are too far away" when executed on client: Player().craftIndex = Entity().index But when executed on the server, the distance check will be skipped. So you could change function "onEnter" like this: function EnterCraft.onEnter() invokeServerFunction("enter") end function EnterCraft.enter() -- Do distance check here if checkEntityInteractionPermissions(Entity(), AlliancePrivilege.FlyCrafts) then Player().craftIndex = Entity().index end end This will allow you to change your ship without any distance check (only works if you do this via interaction menu, not by pressing T). You can do a custom distance check where I commented in function "enter". Link to comment Share on other sites More sharing options...
MRT Posted March 13, 2018 Author Share Posted March 13, 2018 *deleted because my contributions are offensive to developer* Link to comment Share on other sites More sharing options...
Hammelpilaw Posted March 13, 2018 Share Posted March 13, 2018 Oh I see... try this. function EnterCraft.onEnter() invokeServerFunction("enter", Player().index) end function EnterCraft.enter(playerIndex) player = Player(playerIndex) if checkEntityInteractionPermissions(Entity(), AlliancePrivilege.FlyCrafts) then player.craftIndex = Entity().index) end end Btw: only did very short tests for this code as you already figured out, no warrenty :P Edit: Im not sure how exactly checkEntityInteractionPermissions() works... maybe it should be executed when Player() context is available. If this is true you should execute it in function onEnter(). Link to comment Share on other sites More sharing options...
MRT Posted March 14, 2018 Author Share Posted March 14, 2018 *deleted because my contributions are offensive to developer* Link to comment Share on other sites More sharing options...
TinchoX Posted March 23, 2018 Share Posted March 23, 2018 Tried this mod and is working as expected, made my life easier, A LOT easier. Good job people! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now