How To Spawn Models For All Maps

InfinityScript plugins for dedicated servers.
|MR|AFGhaN
TeknoRat
TeknoRat
Posts: 29
Joined: Mon May 30, 2016 2:16 pm

How To Spawn Models For All Maps

Postby |MR|AFGhaN » Wed Aug 03, 2016 6:25 am

Hi Guys How Can i Spawn Models For All Maps Like Ac130s Spawn For All Map


Thanks
Regred; :bravo:
User avatar
kwnav
TeknoCricket
TeknoCricket
Posts: 3
Joined: Thu Jul 21, 2016 2:11 pm

Re: How To Spawn Models For All Maps

Postby kwnav » Wed Aug 03, 2016 9:07 am

here is my code

Code: Select all

using InfinityScript;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Infected
{
    class AC130
    {
        Vector3 GetMinimapOrigin()
        {
            return Call<Entity>(365, "minimap_corner", "targetname").Origin;//getEnt
        }
        int OWNER_ENTREF;
        internal void start(Entity player)
        {
            if (USE_AC130)
            {
                if (OWNER_ENTREF == player.EntRef) return;

                player.Call(33344, "ANOTHER USER IS USING AC130. WAIT");
                return;
            }
            OWNER_ENTREF = player.EntRef;
            player.Call(33503);//disableoffhandweapons
            string curr = player.CurrentWeapon;
            player.GiveWeapon("killstreak_ac130_mp");
            player.SwitchToWeapon("killstreak_ac130_mp");
            //player.Notify("using_remote");

            player.AfterDelay(2000, p => initAC130(p, curr));
        }
        bool USE_AC130;
        int AC_COUNT;
        void initAC130(Entity player, string lastWP)
        {
           
            /*실제 플레이어가 총쏘는 포인트*/
            Entity level_ac130 = Call<Entity>(85, "script_model", GetMinimapOrigin());//spawn
            level_ac130.Call(32929, "c130_zoomrig");//setModel
            level_ac130.SetField("angles", new Vector3(0, 115, 0));//angles horizontal 115 degree
            //level_ac130.owner = undefined;
            //level_ac130.thermal_vision = "ac130_thermal_mp";
            //level_ac130.enhanced_vision = "ac130_enhanced_mp";

            /*스크립트 모델*/
            Entity ac130model = Call<Entity>(85, "script_model", level_ac130.Call<Vector3>("getTagOrigin", "tag_player"));//spawn
            ac130model.Call(32929, "vehicle_ac130_coop");//setModel
            ac130model.Call(32841, level_ac130, "tag_player", new Vector3(0, 80, 32), new Vector3(-25, 0, 0));//linkTo

            /*미니맵 모델*/
            Entity objModel = Call<Entity>(367, player, "script_model", player.Origin + new Vector3(0, 0, 30000), "compass_objpoint_ac130_friendly", "compass_objpoint_ac130_enemy");//spawnPlane
            objModel.Call(33416);//notSolid
            objModel.Call(32841, level_ac130, "tag_player", new Vector3(0, 80, 32), new Vector3(0, -90, 0));//linkTo

            /*if ( getDvarInt( "camera_thirdPerson" ) ) player setThirdPersonDOF( false );*/
           

            player.GiveWeapon("ac130_105mm_mp");
            player.GiveWeapon("ac130_40mm_mp");
            player.GiveWeapon("ac130_25mm_mp");
            player.SwitchToWeapon("ac130_105mm_mp");

            /*player thread overlay( player );*/

            /*player thread attachPlayer( player );*/
            player.Call(32887, level_ac130, "tag_player", 1, 90, 90, 90, 90);//PlayerLinkWeaponviewToDelta
            player.Call(33531, level_ac130.Call<Vector3>("getTagAngles", "tag_player"));//setPlayerAngles

            /* player thread changeWeapons(); */
            /* player thread weaponFiredThread();*/
            /* player thread context_Sensative_Dialog();*/
            /* player thread shotFired();*/

            //float rampupDegrees = 10;
            //float rotateTime = (70 / 360) * rampupDegrees;
            //level_ac130.Call(33408, level_ac130.GetField<Vector3>("angles").Y + rampupDegrees, rotateTime, rotateTime, 0);//rotateyaw

            //H_SET H = Infected.H_FIELD[player.EntRef];

            player.Call(33306, "ac130Ammo105mm", 1);//SetPlayerData
            player.Call(33306, "ac130Ammo40mm", 4);
            player.Call(33306, "ac130Ammo25mm", 20);

            //H.AC130_ON_USE = true;
            USE_AC130 = true;
            Common.StartOrEndThermal(player, true);
            if (!H.AC130_NOTIFIED)
            {
                H.AC130_NOTIFIED = true;

                player.OnNotify("weapon_fired", (p, weapon) =>
                {
                    if (!USE_AC130) return;
                    //if (!H.AC130_ON_USE) return;

                    string w = weapon.ToString();
                    if (!w.StartsWith("ac")) return;

                    int ammoCount = 0;
                    if (w == "ac130_105mm_mp")
                    {
                        Call("earthquake", 0.2f, 1, ac130model.Origin, 1000);
                        ammoCount = player.Call<int>(33470, w);//"GetWeaponAmmoClip"
                        player.Call(33306, "ac130Ammo105mm", ammoCount);//setplayerdata
                    }
                    else if (w == "ac130_40mm_mp")
                    {
                        Call("earthquake", 0.1f, 0.5f, ac130model.Origin, 1000);
                        ammoCount = player.Call<int>(33470, w);
                        player.Call(33306, "ac130Ammo40mm", ammoCount);
                    }
                    else if (w == "ac130_25mm_mp")
                    {
                        ammoCount = player.Call<int>(33470, w);
                        player.Call(33306, "ac130Ammo25mm", ammoCount);
                    }

                    if (ammoCount == 0)
                    {
                        if (w == "ac130_105mm_mp")
                        {
                            p.AfterDelay(5000, x =>
                            {
                                player.Call(33468, w, 1);//"setweaponAmmoClip"
                                player.Call(33306, "ac130Ammo105mm", 1);
                            });
                        }
                        else if (w == "ac130_40mm_mp")
                        {
                            p.AfterDelay(3000, x =>
                            {
                                player.Call(33468, w, 4);
                                player.Call(33306, "ac130Ammo40mm", 4);
                            });
                        }
                        else
                        {
                            p.AfterDelay(1500, x =>
                            {
                                player.Call(33468, w, 20);
                                player.Call(33306, "ac130Ammo25mm", 20);
                            });
                        }

                    }

                });
            }

            AC_COUNT++;
            int ac = AC_COUNT;
            level_ac130.OnInterval(70, ll =>
            {
                if (!USE_AC130|| ac!=AC_COUNT) return false;
                level_ac130.Call(33408, 360, 70);//rotateyaw
                return true;
            });
            int cloud = Call<int>(303, "misc/ac130_cloud");//loadfx
            level_ac130.OnInterval(6000, ll =>
            {
                if (!USE_AC130 || ac != AC_COUNT) return false;
                Call(310, cloud, level_ac130, "tag_player", player);//playfxontagforclients
                return true;
            });
            player.AfterDelay(60000, p =>
            {
                AC_COUNT++;
                OWNER_ENTREF = -1;
                USE_AC130 = false;
                //H.AC130_ON_USE = false;

                player.Call("unlink");//unlink
                player.Call("setplayerangles", Common.ZERO);//setplayerangles

                player.TakeWeapon("killstreak_ac130_mp");
                player.TakeWeapon("ac130_105mm_mp");
                player.TakeWeapon("ac130_40mm_mp");
                player.TakeWeapon("ac130_25mm_mp");

                ac130model.Call("delete");//delete
                objModel.Call("delete");
                level_ac130.Call("delete");

                player.Call("enableOffhandWeapons");//enableOffhandWeapons
                player.SwitchToWeapon(lastWP);
                player.Call("freezeControls", false);//freezeControls
                player.Notify("stopped_using_remote");
                Common.StartOrEndThermal(player, false);
            });
        }
        void thermal()
        {

        }
    }
}

:apc: :teknogods: :tank:
|MR|AFGhaN
TeknoRat
TeknoRat
Posts: 29
Joined: Mon May 30, 2016 2:16 pm

Re: How To Spawn Models For All Maps

Postby |MR|AFGhaN » Wed Aug 03, 2016 11:57 am

can u send me the real code its not working
User avatar
kwnav
TeknoCricket
TeknoCricket
Posts: 3
Joined: Thu Jul 21, 2016 2:11 pm

Re: How To Spawn Models For All Maps

Postby kwnav » Wed Aug 03, 2016 2:16 pm

I tested my code in my server and it works well.



Code: Select all

using InfinityScript;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestServerCommand
{
    public class TSC : BaseScript
    {
        public TSC()
        {
            OnServerCommand("/", (string[] texts) =>
            {
                string key = texts[1].ToLower();
                switch (key)
                {
                    case "fr": Script("fast_Restart inf.dll", false); return;
                    case "mr": Script("map_rotate inf.dll", false); return;

                    case "ulinf": Script("unloadscript inf.dll", true); return;
                    case "linf": Script("loadscript inf.dll", true); return;
                    case "ultdm": Script("unloadscript tdm.dll", true); return;
                    case "ltdm": Script("loadscript tdm.dll", true); return;

                    //case "dialog":
                    //    {
                    //        string res = null;
                    //        for (int i = 0; i < 1024; i++)
                    //        {
                    //            res += " " + Call<string>("tableLookup", "mp/killstreakTable.csv", 0, i, 8);
                    //        }

                    //        Log.Write(LogLevel.None, res);
                    //    }
                    //    return;
                }
            });

            PlayerConnected += player =>
             {
                 player.SetField("ac130", -1);
             };
        }
        void Script(string command1, bool fr)
        {
            Utilities.ExecuteCommand(command1);
            if (fr) Utilities.ExecuteCommand("fast_restart");
        }

        AC130 ac = new AC130();
        public override void OnSay(Entity player, string name, string message)
        {
            if (message == "ac130")
            {
                ac.start(player);
            }
        }

    }

    class AC130 : Infinity
    {
        Vector3 GetMinimapOrigin()
        {
            return Call<Entity>(365, "minimap_corner", "targetname").Origin;//getEnt
        }
        int OWNER_ENTREF;
        internal void start(Entity player)
        {
            if (USE_AC130)
            {
                if (OWNER_ENTREF == player.EntRef) return;

                player.Call(33344, "ANOTHER USER IS USING AC130. WAIT");
                return;
            }
            OWNER_ENTREF = player.EntRef;
            player.Call(33503);//disableoffhandweapons
            string curr = player.CurrentWeapon;
            player.GiveWeapon("killstreak_ac130_mp");
            player.SwitchToWeapon("killstreak_ac130_mp");
            //player.Notify("using_remote");

            player.AfterDelay(2000, p => initAC130(p, curr));
        }
        bool USE_AC130;
        int AC_COUNT;
        void initAC130(Entity player, string lastWP)
        {

            /*실제 플레이어가 총쏘는 포인트*/
            Entity level_ac130 = Call<Entity>(85, "script_model", GetMinimapOrigin());//spawn
            level_ac130.Call(32929, "c130_zoomrig");//setModel
            level_ac130.SetField("angles", new Vector3(0, 115, 0));//angles horizontal 115 degree
            //level_ac130.owner = undefined;
            //level_ac130.thermal_vision = "ac130_thermal_mp";
            //level_ac130.enhanced_vision = "ac130_enhanced_mp";

            /*스크립트 모델*/
            Entity ac130model = Call<Entity>(85, "script_model", level_ac130.Call<Vector3>("getTagOrigin", "tag_player"));//spawn
            ac130model.Call(32929, "vehicle_ac130_coop");//setModel
            ac130model.Call(32841, level_ac130, "tag_player", new Vector3(0, 80, 32), new Vector3(-25, 0, 0));//linkTo

            /*미니맵 모델*/
            Entity objModel = Call<Entity>(367, player, "script_model", player.Origin + new Vector3(0, 0, 30000), "compass_objpoint_ac130_friendly", "compass_objpoint_ac130_enemy");//spawnPlane
            objModel.Call(33416);//notSolid
            objModel.Call(32841, level_ac130, "tag_player", new Vector3(0, 80, 32), new Vector3(0, -90, 0));//linkTo

            /*if ( getDvarInt( "camera_thirdPerson" ) ) player setThirdPersonDOF( false );*/


            player.GiveWeapon("ac130_105mm_mp");
            player.GiveWeapon("ac130_40mm_mp");
            player.GiveWeapon("ac130_25mm_mp");
            player.SwitchToWeapon("ac130_105mm_mp");

            /*player thread overlay( player );*/

            /*player thread attachPlayer( player );*/
            player.Call(32887, level_ac130, "tag_player", 1, 90, 90, 90, 90);//PlayerLinkWeaponviewToDelta
            player.Call(33531, level_ac130.Call<Vector3>("getTagAngles", "tag_player"));//setPlayerAngles

            /* player thread changeWeapons(); */
            /* player thread weaponFiredThread();*/
            /* player thread context_Sensative_Dialog();*/
            /* player thread shotFired();*/

            //float rampupDegrees = 10;
            //float rotateTime = (70 / 360) * rampupDegrees;
            //level_ac130.Call(33408, level_ac130.GetField<Vector3>("angles").Y + rampupDegrees, rotateTime, rotateTime, 0);//rotateyaw

            //H_SET H = Infected.H_FIELD[player.EntRef];

            player.Call(33306, "ac130Ammo105mm", 1);//SetPlayerData
            player.Call(33306, "ac130Ammo40mm", 4);
            player.Call(33306, "ac130Ammo25mm", 20);

            //H.AC130_ON_USE = true;
            USE_AC130 = true;
            //Common.StartOrEndThermal(player, true);
            //if (!H.AC130_NOTIFIED)
            //{
            //    H.AC130_NOTIFIED = true;
            //}

            AC_COUNT++;
            int ac = AC_COUNT;
            level_ac130.OnInterval(70, ll =>
            {
                if (!USE_AC130 || ac != AC_COUNT) return false;
                level_ac130.Call(33408, 360, 70);//rotateyaw
                return true;
            });
            int cloud = Call<int>(303, "misc/ac130_cloud");//loadfx
            level_ac130.OnInterval(6000, ll =>
            {
                if (!USE_AC130 || ac != AC_COUNT) return false;
                Call(310, cloud, level_ac130, "tag_player", player);//playfxontagforclients
                return true;
            });
            player.AfterDelay(60000, p =>
            {
                AC_COUNT++;
                OWNER_ENTREF = -1;
                USE_AC130 = false;
                //H.AC130_ON_USE = false;

                player.Call("unlink");//unlink
                player.Call("setplayerangles", ZERO);//setplayerangles

                player.TakeWeapon("killstreak_ac130_mp");
                player.TakeWeapon("ac130_105mm_mp");
                player.TakeWeapon("ac130_40mm_mp");
                player.TakeWeapon("ac130_25mm_mp");

                ac130model.Call("delete");//delete
                objModel.Call("delete");
                level_ac130.Call("delete");

                player.Call("enableOffhandWeapons");//enableOffhandWeapons
                player.SwitchToWeapon(lastWP);
                player.Call("freezeControls", false);//freezeControls
                player.Notify("stopped_using_remote");
                //Common.StartOrEndThermal(player, false);
            });

            if (player.GetField<int>("ac130")==1) return;
            player.SetField("ac130", 1);
            player.OnNotify("weapon_fired", (p, weapon) =>
            {
                if (!USE_AC130) return;
                //if (!H.AC130_ON_USE) return;

                string w = weapon.ToString();
                if (!w.StartsWith("ac")) return;

                int ammoCount = 0;
                if (w == "ac130_105mm_mp")
                {
                    Call("earthquake", 0.2f, 1, ac130model.Origin, 1000);
                    ammoCount = player.Call<int>(33470, w);//"GetWeaponAmmoClip"
                    player.Call(33306, "ac130Ammo105mm", ammoCount);//setplayerdata
                }
                else if (w == "ac130_40mm_mp")
                {
                    Call("earthquake", 0.1f, 0.5f, ac130model.Origin, 1000);
                    ammoCount = player.Call<int>(33470, w);
                    player.Call(33306, "ac130Ammo40mm", ammoCount);
                }
                else if (w == "ac130_25mm_mp")
                {
                    ammoCount = player.Call<int>(33470, w);
                    player.Call(33306, "ac130Ammo25mm", ammoCount);
                }

                if (ammoCount == 0)
                {
                    if (w == "ac130_105mm_mp")
                    {
                        p.AfterDelay(5000, x =>
                        {
                            player.Call(33468, w, 1);//"setweaponAmmoClip"
                            player.Call(33306, "ac130Ammo105mm", 1);
                        });
                    }
                    else if (w == "ac130_40mm_mp")
                    {
                        p.AfterDelay(3000, x =>
                        {
                            player.Call(33468, w, 4);
                            player.Call(33306, "ac130Ammo40mm", 4);
                        });
                    }
                    else
                    {
                        p.AfterDelay(1500, x =>
                        {
                            player.Call(33468, w, 20);
                            player.Call(33306, "ac130Ammo25mm", 20);
                        });
                    }

                }

            });

        }
        Vector3 ZERO = new Vector3();
    }

    public class Infinity
    {
        protected TReturn Call<TReturn>(string func, params Parameter[] parameters)
        {
            Function.SetEntRef(-1);
            return Function.Call<TReturn>(func, parameters);
        }
        protected TReturn Call<TReturn>(int func, params Parameter[] parameters)
        {
            Function.SetEntRef(-1);
            return Function.Call<TReturn>(func, parameters);
        }

        protected void Call(string func, params Parameter[] parameters)
        {
            Function.SetEntRef(-1);
            Function.Call(func, parameters);
        }
        protected void Call(int func, params Parameter[] parameters)
        {
            Function.SetEntRef(-1);
            Function.Call(func, parameters);
        }
    }

}


:apc: :teknogods: :tank:
User avatar
S3VDIT0
TeknoCow
TeknoCow
Posts: 68
Joined: Tue Jun 16, 2015 7:50 am
Location: Russian Federation
Contact:

Re: How To Spawn Models For All Maps

Postby S3VDIT0 » Sat Aug 06, 2016 12:08 pm

kwnav wrote:here is my code

Code: Select all

using InfinityScript;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Infected
{
    class AC130
    {
        Vector3 GetMinimapOrigin()
        {
            return Call<Entity>(365, "minimap_corner", "targetname").Origin;//getEnt
        }
        int OWNER_ENTREF;
        internal void start(Entity player)
        {
            if (USE_AC130)
            {
                if (OWNER_ENTREF == player.EntRef) return;

                player.Call(33344, "ANOTHER USER IS USING AC130. WAIT");
                return;
            }
            OWNER_ENTREF = player.EntRef;
            player.Call(33503);//disableoffhandweapons
            string curr = player.CurrentWeapon;
            player.GiveWeapon("killstreak_ac130_mp");
            player.SwitchToWeapon("killstreak_ac130_mp");
            //player.Notify("using_remote");

            player.AfterDelay(2000, p => initAC130(p, curr));
        }
        bool USE_AC130;
        int AC_COUNT;
        void initAC130(Entity player, string lastWP)
        {
           
            /*실제 플레이어가 총쏘는 포인트*/
            Entity level_ac130 = Call<Entity>(85, "script_model", GetMinimapOrigin());//spawn
            level_ac130.Call(32929, "c130_zoomrig");//setModel
            level_ac130.SetField("angles", new Vector3(0, 115, 0));//angles horizontal 115 degree
            //level_ac130.owner = undefined;
            //level_ac130.thermal_vision = "ac130_thermal_mp";
            //level_ac130.enhanced_vision = "ac130_enhanced_mp";

            /*스크립트 모델*/
            Entity ac130model = Call<Entity>(85, "script_model", level_ac130.Call<Vector3>("getTagOrigin", "tag_player"));//spawn
            ac130model.Call(32929, "vehicle_ac130_coop");//setModel
            ac130model.Call(32841, level_ac130, "tag_player", new Vector3(0, 80, 32), new Vector3(-25, 0, 0));//linkTo

            /*미니맵 모델*/
            Entity objModel = Call<Entity>(367, player, "script_model", player.Origin + new Vector3(0, 0, 30000), "compass_objpoint_ac130_friendly", "compass_objpoint_ac130_enemy");//spawnPlane
            objModel.Call(33416);//notSolid
            objModel.Call(32841, level_ac130, "tag_player", new Vector3(0, 80, 32), new Vector3(0, -90, 0));//linkTo

            /*if ( getDvarInt( "camera_thirdPerson" ) ) player setThirdPersonDOF( false );*/
           

            player.GiveWeapon("ac130_105mm_mp");
            player.GiveWeapon("ac130_40mm_mp");
            player.GiveWeapon("ac130_25mm_mp");
            player.SwitchToWeapon("ac130_105mm_mp");

            /*player thread overlay( player );*/

            /*player thread attachPlayer( player );*/
            player.Call(32887, level_ac130, "tag_player", 1, 90, 90, 90, 90);//PlayerLinkWeaponviewToDelta
            player.Call(33531, level_ac130.Call<Vector3>("getTagAngles", "tag_player"));//setPlayerAngles

            /* player thread changeWeapons(); */
            /* player thread weaponFiredThread();*/
            /* player thread context_Sensative_Dialog();*/
            /* player thread shotFired();*/

            //float rampupDegrees = 10;
            //float rotateTime = (70 / 360) * rampupDegrees;
            //level_ac130.Call(33408, level_ac130.GetField<Vector3>("angles").Y + rampupDegrees, rotateTime, rotateTime, 0);//rotateyaw

            //H_SET H = Infected.H_FIELD[player.EntRef];

            player.Call(33306, "ac130Ammo105mm", 1);//SetPlayerData
            player.Call(33306, "ac130Ammo40mm", 4);
            player.Call(33306, "ac130Ammo25mm", 20);

            //H.AC130_ON_USE = true;
            USE_AC130 = true;
            Common.StartOrEndThermal(player, true);
            if (!H.AC130_NOTIFIED)
            {
                H.AC130_NOTIFIED = true;

                player.OnNotify("weapon_fired", (p, weapon) =>
                {
                    if (!USE_AC130) return;
                    //if (!H.AC130_ON_USE) return;

                    string w = weapon.ToString();
                    if (!w.StartsWith("ac")) return;

                    int ammoCount = 0;
                    if (w == "ac130_105mm_mp")
                    {
                        Call("earthquake", 0.2f, 1, ac130model.Origin, 1000);
                        ammoCount = player.Call<int>(33470, w);//"GetWeaponAmmoClip"
                        player.Call(33306, "ac130Ammo105mm", ammoCount);//setplayerdata
                    }
                    else if (w == "ac130_40mm_mp")
                    {
                        Call("earthquake", 0.1f, 0.5f, ac130model.Origin, 1000);
                        ammoCount = player.Call<int>(33470, w);
                        player.Call(33306, "ac130Ammo40mm", ammoCount);
                    }
                    else if (w == "ac130_25mm_mp")
                    {
                        ammoCount = player.Call<int>(33470, w);
                        player.Call(33306, "ac130Ammo25mm", ammoCount);
                    }

                    if (ammoCount == 0)
                    {
                        if (w == "ac130_105mm_mp")
                        {
                            p.AfterDelay(5000, x =>
                            {
                                player.Call(33468, w, 1);//"setweaponAmmoClip"
                                player.Call(33306, "ac130Ammo105mm", 1);
                            });
                        }
                        else if (w == "ac130_40mm_mp")
                        {
                            p.AfterDelay(3000, x =>
                            {
                                player.Call(33468, w, 4);
                                player.Call(33306, "ac130Ammo40mm", 4);
                            });
                        }
                        else
                        {
                            p.AfterDelay(1500, x =>
                            {
                                player.Call(33468, w, 20);
                                player.Call(33306, "ac130Ammo25mm", 20);
                            });
                        }

                    }

                });
            }

            AC_COUNT++;
            int ac = AC_COUNT;
            level_ac130.OnInterval(70, ll =>
            {
                if (!USE_AC130|| ac!=AC_COUNT) return false;
                level_ac130.Call(33408, 360, 70);//rotateyaw
                return true;
            });
            int cloud = Call<int>(303, "misc/ac130_cloud");//loadfx
            level_ac130.OnInterval(6000, ll =>
            {
                if (!USE_AC130 || ac != AC_COUNT) return false;
                Call(310, cloud, level_ac130, "tag_player", player);//playfxontagforclients
                return true;
            });
            player.AfterDelay(60000, p =>
            {
                AC_COUNT++;
                OWNER_ENTREF = -1;
                USE_AC130 = false;
                //H.AC130_ON_USE = false;

                player.Call("unlink");//unlink
                player.Call("setplayerangles", Common.ZERO);//setplayerangles

                player.TakeWeapon("killstreak_ac130_mp");
                player.TakeWeapon("ac130_105mm_mp");
                player.TakeWeapon("ac130_40mm_mp");
                player.TakeWeapon("ac130_25mm_mp");

                ac130model.Call("delete");//delete
                objModel.Call("delete");
                level_ac130.Call("delete");

                player.Call("enableOffhandWeapons");//enableOffhandWeapons
                player.SwitchToWeapon(lastWP);
                player.Call("freezeControls", false);//freezeControls
                player.Notify("stopped_using_remote");
                Common.StartOrEndThermal(player, false);
            });
        }
        void thermal()
        {

        }
    }
}


You can use this passage to get rid of modding movement of aircraft

Code: Select all

            public static Entity ReturnAC130()//hide
            {
                for (int i = 0; i < 2048; i++)
                {
                    Entity Target = Entity.GetEntity(i);
                    if (Target.GetField<string>("model").Contains("vehicle_ac130_coop"))
                        return Target;
                }
                return null;
            }

Return to “InfinityScript”

Who is online

Users browsing this forum: No registered users and 6 guests