ItsMods

Full Version: Modifying plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How I can modify this plugin to work in teknomw3

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using InfinityScript;
using System.IO;

namespace ManualMapEdit
{
    public class ManualMapEdit : BaseScript
    {
        bool creating = false;
        float startx;
        float starty;
        float startz;
        float endx;
        float endy;
        float endz;

        public ManualMapEdit()
            : base()
        {
            PlayerConnected += new Action<Entity>(player =>
            {
                player.Call("notifyonplayercommand", "fly", "+frag");
                player.OnNotify("fly", (ent) =>
                {
                    if (player.GetField<string>("sessionstate") != "spectator")
                    {
                        player.Call("allowspectateteam", "freelook", true);
                        player.SetField("sessionstate", "spectator");
                        player.Call("setcontents", 0);
                    }
                    else
                    {
                        player.Call("allowspectateteam", "freelook", false);
                        player.SetField("sessionstate", "playing");
                        player.Call("setcontents", 100);
                    }
                });
            });
        }
        public override void OnSay(Entity player, string playerName, string text)
        {
            var mapname = Call<string>("getdvar", "mapname");

            string[] msg = text.Split(' ');


            if (msg[0] == "!restart")
            {
                Call("setdvar", "map_restart", "1");
            }

            if (msg[0] == "!wall" && !creating)
            {
                player.Call("iprintlnbold", "^2START SET: " + player.Origin);
                startx = player.Origin.X;
                starty = player.Origin.Y;
                startz = player.Origin.Z;
                creating = true;
            }
            else if (msg[0] == "!wall" && creating)
            {
                player.Call("iprintlnbold", "^2END SET: "+player.Origin);
                endx = player.Origin.X;
                endy = player.Origin.Y;
                endz = player.Origin.Z;
                creating = false;
                File.AppendAllText("scripts\\maps\\" + mapname + ".txt", Environment.NewLine + "wall: (" + startx + "," + starty + "," + startz + ") ; (" + endx + "," + endy + "," + endz + ")");
            }

            if (msg[0] == "!ramp" && !creating)
            {
                player.Call("iprintlnbold", "^2START SET: " + player.Origin);
                startx = player.Origin.X;
                starty = player.Origin.Y;
                startz = player.Origin.Z;
                creating = true;
            }
            else if (msg[0] == "!ramp" && creating)
            {
                player.Call("iprintlnbold", "^2END SET: " + player.Origin);
                endx = player.Origin.X;
                endy = player.Origin.Y;
                endz = player.Origin.Z;
                creating = false;
                File.AppendAllText("scripts\\maps\\" + mapname + ".txt", Environment.NewLine + "ramp: (" + startx + "," + starty + "," + startz + ") ; (" + endx + "," + endy + "," + endz + ")");
            }

            if (msg[0] == "!tp" && !creating)
            {
                player.Call("iprintlnbold", "^2START SET: " + player.Origin);
                startx = player.Origin.X;
                starty = player.Origin.Y;
                startz = player.Origin.Z;
                creating = true;
            }
            else if (msg[0] == "!tp" && creating)
            {
                player.Call("iprintlnbold", "^2END SET: " + player.Origin);
                endx = player.Origin.X;
                endy = player.Origin.Y;
                endz = player.Origin.Z;
                creating = false;
                File.AppendAllText("scripts\\maps\\" + mapname + ".txt", Environment.NewLine + "elevator: (" + startx + "," + starty + "," + startz + ") ; (" + endx + "," + endy + "," + endz + ")");
            }

            if (msg[0] == "!htp" && !creating)
            {
                player.Call("iprintlnbold", "^2START SET: " + player.Origin);
                startx = player.Origin.X;
                starty = player.Origin.Y;
                startz = player.Origin.Z;
                creating = true;
            }
            else if (msg[0] == "!htp" && creating)
            {
                player.Call("iprintlnbold", "^2END SET: " + player.Origin);
                endx = player.Origin.X;
                endy = player.Origin.Y;
                endz = player.Origin.Z;
                creating = false;
                File.AppendAllText("scripts\\maps\\" + mapname + ".txt", Environment.NewLine + "HiddenTP: (" + startx + "," + starty + "," + startz + ") ; (" + endx + "," + endy + "," + endz + ")");
            }

            if (msg[0] == "!floor" && !creating)
            {
                player.Call("iprintlnbold", "^2START SET: " + player.Origin);
                startx = player.Origin.X;
                starty = player.Origin.Y;
                startz = player.Origin.Z;
                creating = true;
            }
            else if (msg[0] == "!floor" && creating)
            {
                player.Call("iprintlnbold", "^2END SET: " + player.Origin);
                endx = player.Origin.X;
                endy = player.Origin.Y;
                endz = player.Origin.Z;
                creating = false;
                File.AppendAllText("scripts\\maps\\" + mapname + ".txt", Environment.NewLine + "floor: (" + startx + "," + starty + "," + startz + ") ; (" + endx + "," + endy + "," + endz + ")");
            }

        }
    }
}

Please help me Tongue
You can't make the damn MapEdit that we created for TeknoShit as the API's are different plus IW5M contains the Script coding in the dll, not in infinityscript kbai

Actually that's some other leechers work who got our old source and made his own l0l
then I can not modify a plugin that is iw5m to work in teknomw3 ??
This isnt a forum for either of those versions of MW3. My suggestion is that you should ask on those sites for help regarding non retail versions of MW3. This forum is for the retail (legal and legit) version of MW3.
(10-19-2013, 00:44)maverigh Wrote: [ -> ]then I can not modify a plugin that is iw5m to work in teknomw3 ??
Obviously not, now screw off with your shitty crack.



inb4shitty4d1commentsby@sailrmoon
Don't listen to idiots like @DidUknowiPwn .
And it is not supported.. ( maybe it isn't even possible ).