ItsMods

Full Version: Teleport plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2


Credits:
Litgar: Creator
That's awesome...
Cool, nice job!
The good old zombie flags. Goodjob. Repped.
and you can link to download the plugin
(07-27-2012, 12:22)d0h! Wrote: [ -> ]@ everyone! ENGLISH only

http://www.itsmods.com/forum/Thread-Rele...orter.html

Okay

Nah, that teleporter is better. It has flags.
Maybe it'll very useful for bunkers etc ( @Killingdyl "care package is cool" )
As @surtek said
"The old good teleporter flags"
i thought posting the link will at least give him something since this is a preview only thread
(07-27-2012, 12:45)d0h! Wrote: [ -> ]i thought posting the link will at least give him something since this is a preview only thread

oh, okay
This should do
Thanks to @master131 for Distance code
Code:
public static double Distance(Vector vec1, Vector vec2)
        {
            return Math.Sqrt(Math.Pow(vec1.X - vec2.X, 2) + Math.Pow(vec1.Y - vec2.Y, 2) + Math.Pow(vec1.Z - vec2.Z, 2));
        }
public override void OnMapChange()
        {
                     Entity flag = SpawnModel("script_brushmodel", "prop_flag_neutral", new Vector(1343.3f, 1742.7f, -254.8f)); // change with your flag co-ordinates
     }
public override void OnAddonFrame()
        {
            if (GetClients() != null)
            {
                foreach (ServerClient Client in GetClients())
                {
                    if (Distance(new Vector(Client.OriginX, Client.OriginY, Client.OriginZ), new Vector(1343.3f, 1742.7f, -254.8f)) <= 50)//same as flag
                    {
                        Client.OriginX = 1322f;//where to teleport
                        Client.OriginY = 1455.7f;
                        Client.OriginZ=-255f;
                    }
                }
            }
        }
Pages: 1 2