示例#1
0
 private void SetPlayerEnterCam(int handle, bool flag)
 {
     API.SetEntityCollision(handle, !flag, !flag);
     API.SetEntityVisible(handle, !flag, false);
     API.SetPlayerControl(handle, !flag, 0);
     API.SetEntityInvincible(handle, flag);
     API.FreezeEntityPosition(handle, flag);
 }
示例#2
0
        // Drop saw on the ground
        private async Task DropSaw()
        {
            CurrentSaw.Detach();
            LocalPlayer.Character.Task.ClearAnimation(AnimDict, AnimName);
            var PlayerOffset = LocalPlayer.Character.GetOffsetPosition(new Vector3(0f, 1f, 100f));

            CurrentSaw.Position = new Vector3(PlayerOffset.X, PlayerOffset.Y, CurrentSaw.Position.Z - CurrentSaw.HeightAboveGround);
            await Delay(100);

            API.FreezeEntityPosition(CurrentSaw.Handle, true);
            CurrentSaw = null;
        }