Advertisement
Guest User

Vietnam slide

a guest
Jul 9th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.28 KB | None | 0 0
  1. /*
  2.     slide.nut
  3.  
  4.     Copyright ©  2017 Ice Flake
  5.  
  6.     This program is free software: you can redistribute it and/or modify
  7.     it under the terms of the GNU Affero General Public License as published by
  8.     the Free Software Foundation, either version 3 of the License, or
  9.     (at your option) any later version.
  10.  
  11.     This program is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.     GNU Affero General Public License for more details.
  15.  
  16.     You should have received a copy of the GNU Affero General Public License
  17.     along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18. */
  19.  
  20. Routine(function ()
  21. {
  22.     if (Sliding == CEncodedBoolean.True)
  23.     {
  24.         local player            = World.FindLocalPlayer();
  25.  
  26.         local trueangle         = Angle + (PI * 0.5);
  27.         local targetposition    = Vector(CSlideSettings.Radius * cos(trueangle) + player.Position.X, CSlideSettings.Radius * sin(trueangle) + player.Position.Y, player.Position.Z);
  28.  
  29.         if (RayTrace(player.Position, targetposition, RAY_BUILDING | RAY_VEHICLE | RAY_OBJECT).Collided == false) player.Position = targetposition;
  30.     }
  31. }, CSlideSettings.Interval);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement