Solved Getting player position?
Discussion in 'Rust Development' started by #Welaurs, Nov 26, 2016.
-
Docs: Oxide API for Rust
Things like player position is however now stored in those docs. You can use a program like dotPeek and dig into the assembly and find those lines of code. Or look in pre-existing plugins such as Teleportation, etc.
Examples of finding player position:
Code:object GetPosition(BasePlayer player) => return player.transform.position;object GetPositionType(int type, BasePlayer player){ if (type==0) return player.transform.position.x; else if (type==1) return player.transform.position.y; else if (type==2) return player.transform.position.z; else return null; }
[DOUBLEPOST=1480147459][/DOUBLEPOST]Flippable Turrets for Rust | Oxide this has a example of setting position. However it does it on turrets(same method on players).
Example(its hard to find normally):
Code:(turret.transform.position.x, turret.transform.position.y, turret.transform.position.z)
-
Attached Files:
-
-
Things like player position is however *not* stored in those docs. You can use a program like dotPeek and dig into the assembly and find those lines of code. Or look in pre-existing plugins such as Teleportation, etc. It said now before, sorry