Jump to content

INI Support for .net scripts


Recommended Posts

***I also posted this on the Scripthood.net forum***

I created my first .net script using visual basic. Everything works great but i would like to set up an INI. I read through lots of forum discussion and the excellent documentation Hazard X gives out with his Scripthook.net. I just can't find an example, or at least, how to tie one into a script. I created an .ini in notepad but don't know how to tie them together. Could someone give me some help?

This is a piece of my script:

 

 

   Public Sub ClosestPedAsPsycho_KeyDown(ByVal sender As Object, ByVal e As GTA.KeyEventArgs) Handles MyBase.KeyDown       If e.Key <> Keys.N Then Return       Dim P As Ped = World.GetClosestPed(Player.Character.Position, 50.0F)       If Exists(P) Then           game.displaytext("A Psychotic Pedestrian!")           p.BecomeMissionCharacter()           p.startkillingspree(alsoAttackPlayer:=True)           p.CurrentRoom = Player.Character.CurrentRoom           p.WillDoDrivebys = True           p.PriorityTargetForEnemies = True           p.CanSwitchWeapons = True           p.DuckWhenAimedAtByGroupMember = True           p.SetPathfinding(True, True, True)           p.WillUseCarsInCombat = True           p.Accuracy = 100           p.MaxHealth = 100           p.Armor = 100           p.WillFlyThroughWindscreen = True           p.WantedByPolice = True

 

 

BTW, i'd also like to thank LMS for help with my first forum post. His help gave me some understanding into what was necessary to "grab" peds and vehicle from the world to create my mod.

 

***EDIT: I've read over the tutorial (Sent to me by Hardsty1e) for the C# INI functions and tried but cannot convert them to V.B. My knowledge of V.B. is limited, i know absolutely nothing about C#.

 

 

****SECOND EDIT: I've got a functional INI now, thanks to eveyone who messaged me and game me suggestions / links needed to understand it. smile.gif

Edited by motorsport71
Link to comment
https://gtaforums.com/topic/468147-ini-support-for-net-scripts/
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.