What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Don't work Camera.Instance

phabi0z

New Member
Joined
Sep 25, 2013
Messages
10
Reaction score
0
I'm trying to write plugin for turret,
but Camera's methods don't work

A simple plugin code:

Code:
using Scylla.Common;
using Scylla.Common.Math;
using Scylla.Common.Plugins;
using Scylla.Wot;
using Scylla.Wot.Objects.Environment;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace Scylla.CommonBot.Plugins
{
    public class HotspotLogger : IPlugin
    {
        public string Author
        {
            get { return "phabi0z"; }
        }

        public Version Version
        {
            get { return new Version(1, 0, 0, 0); }
        }

        public string Name
        {
            get { return "Turret Positioner"; }
        }

        public string Description
        {
            get { return "Autopositioning of turret"; }
        }

        public System.Windows.Window DisplayWindow
        {
            get { return null; }
        }

        public void OnPulse()
        {
            //if (ScyllaWot.Me.Vehicle.IsAlive)// && ScyllaWot.Me.Vehicle.IsAlive)
            //{
            //    Logging.Write("{0} 1", Name);
            //    Camera.Instance.RotateX(5);
            //}
        }

        public void OnInitialize()
        {

        }

        public void OnShutdown()
        {

        }

        public void OnEnabled()
        {
            Hotkeys.RegisterHotkey("Camera RotateX  on F11", CameraRotateX, Keys.F11);
            Logging.Write("{0} {1} plugin enabled.", Name, Version);
        }

        public void OnDisabled()
        {
            Hotkeys.RemoveHotkey("Camera RotateX on F11");
            Logging.Write("{0} {1} plugin disabled.", Name, Version);
        }

      
        public bool Equals(IPlugin other)
        {
            return Name == other.Name && Version == other.Version;
        }

	public void CameraRotateX()

        {
            double yaw = (double)ScyllaWot.Me.Vehicle.Yaw;
	    Camera.Instance.RotateX(yaw);
	    Logging.Write("Yaw: {0}", yaw);
        }
    }
}
 
Camera.Instance only works in the garage.
In the battle is not working.
 
Camera.Instance as zpustit to battle for what then.Camera.dlya target lock or sector
 
Back
Top