Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Ported from AlexanderBlade's Native Trainer
- by SteamSilenceChannel for the "STCE's Quick Teleport Utiliy"
- */
- //First of all, You have to check "Allow unsafe code" in project Properties>Build
- void findGroundOnWaypoint()
- {
- Ped playerPed = Game.Player.Character;
- Vector3 pos = World.GetWaypointPosition();
- float[] groundHeight = {100.0f, 150.0f, 50.0f, 0.0f, 200.0f, 250.0f, 300.0f, 350.0f,
- 400.0f, 450.0f, 500.0f, 550.0f, 600.0f, 650.0f, 700.0f, 750.0f, 800.0f};
- foreach (float height in groundHeight)
- {
- unsafe
- {
- float z = 0;
- playerPed.Position = new Vector3(pos.X, pos.Y, height);
- Wait(100);
- if (Function.Call<bool>(Hash.GET_GROUND_Z_FOR_3D_COORD, pos.X, pos.Y, height, &z))
- {
- playerPed.Position = new Vector3(pos.X, pos.Y, z + 3);
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement