Jump to content

More Combat Lines


GamerGreekZone

Recommended Posts

GamerGreekZone

Here I found this Code while messing around with Liberty Tweaks source code. (I put it down so you can see it). This could be used so that it's compatible with Complete Edition, unfortunately I'm only a human with no experience with this. So knock yourself out and make a mod that is compatible for more Complete edition. : )

 

My tip is change 6 things so it's compatible

1. What it's using. (change it into something that's compatible with scripthook)

2. The command "static", i think this is a command that makes things simpler but we can't use that in 1.20.59 : (

3. Change "GetBoolean" 

4. The IVPeds

5. While using the Console i found out it uses another IVSDKNET or Clonks Coding Library which is "Native" 

6. Lastly it uses something called "Main" that is found in Liberty Tweaks itself.

 

using IVSDKDotNet;
using CCL.GTAIV;
using IVSDKDotNet.Native;

namespace LibertyTweaks
{
    internal class MoreCombatLines
    {

        private static bool enable;
        public static void Init(SettingsFile settings)
        {
            enable = settings.GetBoolean("More Dialogue", "Combat", true);
        }
        public static void Tick()
        {
            if (!enable)
                return;

            bool pCombat;
            IVPed playerPed = IVPed.FromUIntPtr(IVPlayerInfo.FindThePlayerPed());

            pCombat = Natives.IS_CHAR_SHOOTING(playerPed.GetHandle());
            if (pCombat == true)
            {
                switch (Main.GenerateRandomNumber(0, 350))
                {
                    case 0:
                        playerPed.SayAmbientSpeech("IN_COVER_DODGE_BULLETS");
                        break;

                    case 1:
                        playerPed.SayAmbientSpeech("SHOOT");
                        break;

                    case 2:
                        playerPed.SayAmbientSpeech("KILLED_ALL");
                        break;

                    case 3:
                        playerPed.SayAmbientSpeech("CHASED");
                        break;

                    case 4:
                        playerPed.SayAmbientSpeech("GENERIC_INSULT");
                        break;

                    case 5:
                        playerPed.SayAmbientSpeech("FIGHT");
                        break;

                    case 6:
                        playerPed.SayAmbientSpeech("STAY_DOWN");
                        break;

                    case 7:
                        playerPed.SayAmbientSpeech("PULL_GUN");
                        break;

                    default:
                        break;
                }
            }
            else
            {

            }
        }
    }
}

Edited by GamerGreekZone
Link to comment
https://gtaforums.com/topic/998643-more-combat-lines/
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.