beifahrer fahrer waypoint
This commit is contained in:
@@ -1,5 +1,24 @@
|
||||
export default function waypointUtil() {
|
||||
mp.events.add("SERVER:Util_setWaypoint", (x, y) => {
|
||||
|
||||
let x_saved: number;
|
||||
let y_saved: number;
|
||||
let z_saved: number;
|
||||
|
||||
mp.events.add("SERVER:Util_setWaypoint", (x, y, z) => {
|
||||
mp.game.ui.setNewWaypoint(x, y);
|
||||
});
|
||||
|
||||
mp.events.add("playerCreateWaypoint", (position) => {
|
||||
x_saved = position.x;
|
||||
y_saved = position.y;
|
||||
z_saved = position.z;
|
||||
mp.events.callRemote("SERVER:waypointToDriver", position.x, position.y);
|
||||
});
|
||||
|
||||
mp.events.add("gotoWaypoint", () => {
|
||||
mp.gui.chat.push("xyz: " + x_saved + " " + y_saved + " " + z_saved);
|
||||
mp.players.local.position = new mp.Vector3(x_saved, y_saved, z_saved);
|
||||
|
||||
//coord.z = mp.game.gameplay.getGroundZFor3dCoord(coord.x, coord.y, i * 50, 0, false); // try calcualte Z
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user