Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. DLC
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
      7. The Diamond Casino Heist
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
vizzminzi

Settings.INI file help!

Recommended Posts

vizzminzi

This is the code

bool trainer_switch_pressed(){    int keyzz = GetPrivateProfileInt("CONTROLS", "ACTIVATE", 0x78, "./Settings.ini");    return IsKeyJustUp(keyzz);    }

This is the Settings.ini file in the gta v directory where the mod file is.

[CONTROLS]ACTIVATE=0x67

It should open with numpad 7 button but it open for f9 ( default button ).

 

Any one know how to fix this? thanks :D

 

 

 

 

Code from : http://gtaforums.com/topic/812649-ini-file-how-to/

 

Share this post


Link to post
Share on other sites
ClareXoBearrx3R9

This is the code

bool trainer_switch_pressed(){    int keyzz = GetPrivateProfileInt("CONTROLS", "ACTIVATE", 0x78, "./Settings.ini");    return IsKeyJustUp(keyzz);    }
This is the Settings.ini file in the gta v directory where the mod file is.

 

[CONTROLS]ACTIVATE=0x67
It should open with numpad 7 button but it open for f9 ( default button ).

 

Any one know how to fix this? thanks :D

 

 

 

 

Code from : http://gtaforums.com/topic/812649-ini-file-how-to/

 

Use the integer value instead :)

Share this post


Link to post
Share on other sites
vizzminzi

 

This is the code

bool trainer_switch_pressed(){    int keyzz = GetPrivateProfileInt("CONTROLS", "ACTIVATE", 0x78, "./Settings.ini");    return IsKeyJustUp(keyzz);    }
This is the Settings.ini file in the gta v directory where the mod file is.

 

[CONTROLS]ACTIVATE=0x67
It should open with numpad 7 button but it open for f9 ( default button ).

 

Any one know how to fix this? thanks :D

 

 

 

 

Code from : http://gtaforums.com/topic/812649-ini-file-how-to/

 

Use the integer value instead :)

 

 

what do you mean :)

Share this post


Link to post
Share on other sites
pillow

vizzminzi you have skype?

Share this post


Link to post
Share on other sites
ClareXoBearrx3R9

I mean in your INI file, use the following integers in-place of say '0x67' :)

Key        Code------------------Left Mouse    1Right Mouse    2Middle Mouse    4A        65B        66C        67D        68E        69F        70G        71H        72I        73J        74K        75L        76M        77N        78O        79P        80Q        81R        82S        83T        84U        85V        86W        87X        88Y        89Z        900        481        492        503        514        525        536        547        558        569        57Numpad 0    96Numpad 1    97Numpad 2    98Numpad 3    99Numpad 4    100Numpad 5    101Numpad 6    102Numpad 7    103Numpad 8    104Numpad 9    105Multiply    106Add        107Enter        13Subtract    109Decimal        110Divide        111F1        112F2        113F3        114F4        115F5        116F6        117F7        118F8        119F9        120F10        121F11        122F12        123Backspace    8Tab        9Enter        13Shift        16Lcontrol    162Rcontrol    163Lalt        164Ralt        165Caps Lock    20Esc        27Spacebar    32Page Up        33Page Down    34End        35Home        36Left Arrow    37Up Arrow    38Right Arrow    39Down Arrow    40Insert        45Delete        46Num Lock    144ScrLk        145Pause/Break    19; :        186= +        187- _        189/ ?        191` ~        192[ {        219\ |        220] }        221" '        222,        188.        190/        191LShift        160RShift        161PrintSCrn    44L-Win        91R-Win        92Menu        93Num Enter    108Browser buttons (for Internet Keyboards)Back        166Forward        167Refresh        168Stop        169Search        170Favourites    171Home        172Mail        180Media Buttons (for Multimedia Keyboards)Next        176Previous    177Stop        178Play/Pause    179Mute        173Vol Down    174Vol Up        175

Credits to sjaak327 for listing these in his .ini file.

 

  • Like 1

Share this post


Link to post
Share on other sites
vizzminzi

I mean in your INI file, use the following integers in-place of say '0x67' :)

Key        Code------------------Left Mouse    1Right Mouse    2Middle Mouse    4A        65B        66C        67D        68E        69F        70G        71H        72I        73J        74K        75L        76M        77N        78O        79P        80Q        81R        82S        83T        84U        85V        86W        87X        88Y        89Z        900        481        492        503        514        525        536        547        558        569        57Numpad 0    96Numpad 1    97Numpad 2    98Numpad 3    99Numpad 4    100Numpad 5    101Numpad 6    102Numpad 7    103Numpad 8    104Numpad 9    105Multiply    106Add        107Enter        13Subtract    109Decimal        110Divide        111F1        112F2        113F3        114F4        115F5        116F6        117F7        118F8        119F9        120F10        121F11        122F12        123Backspace    8Tab        9Enter        13Shift        16Lcontrol    162Rcontrol    163Lalt        164Ralt        165Caps Lock    20Esc        27Spacebar    32Page Up        33Page Down    34End        35Home        36Left Arrow    37Up Arrow    38Right Arrow    39Down Arrow    40Insert        45Delete        46Num Lock    144ScrLk        145Pause/Break    19; :        186= +        187- _        189/ ?        191` ~        192[ {        219\ |        220] }        221" '        222,        188.        190/        191LShift        160RShift        161PrintSCrn    44L-Win        91R-Win        92Menu        93Num Enter    108Browser buttons (for Internet Keyboards)Back        166Forward        167Refresh        168Stop        169Search        170Favourites    171Home        172Mail        180Media Buttons (for Multimedia Keyboards)Next        176Previous    177Stop        178Play/Pause    179Mute        173Vol Down    174Vol Up        175

Credits to sjaak327 for listing these in his .ini file.

 

 

Awesome, i will give this a try :D

Thank you :D

 

but it didnt fix the issue :/

Edited by vizzminzi

Share this post


Link to post
Share on other sites
vizzminzi

vizzminzi you have skype?

Sorry no :/

Share this post


Link to post
Share on other sites
ClareXoBearrx3R9

Awesome, i will give this a try :D

Thank you :D

 

but it didnt fix the issue :/

 

 

I never had any success with IsKeyJustUp (not sure why- but I'm sure I was missing something somewhere- but I looked for it and couldn't find it so I just stopped using it and used something else. :)

 

So how I do it:

// Toggle Key Vars (this is where I declared my key variables - which will be used to check if they are pressed later)SHORT key_master, key_toggleEIS, key_toggleOSD;// Function that I use to Initialize all default controls from my INI file.int init_ini_controls(){    // Controls    key_master = ini_readInt("CONTROLS", "key_master", 121);    key_toggleEIS = ini_readInt("CONTROLS", "key_toggleEIS", 69);    key_toggleOSD = ini_readInt("CONTROLS", "key_toggleDash", 68);    ... }

Then later in your script's main() or whatever, I use:

// In the beginning, call init_ini_controls() once to initialize the controls. You can also do this// in a constructor which would be the better way to do it like someone else did.// Use this to detect when the keys are pressedif (GetAsyncKeyState(key_master) && GetAsyncKeyState(key_toggleEIS)){   // Do whatever you need to do when the key is pressed. In this case, it happens when F10+E is pressed.   // Note that F10 = master_key and E = key_toggleEIS (by default)}

If you want to just do it when E is pressed then:

// Use this to detect when the keys are pressedif (GetAsyncKeyState(key_toggleEIS)){   // Do whatever you need to do when the key is pressed. In this case, it happens when F10+E is pressed.   // Note that F10 = master_key and E = key_toggleEIS (by default)}

Note the ini_readInt function I used was a straight copy & paste of Skorpro's helper functions (that I mentioned earlier):

int ini_readInt(char* Section, char* Key, int DefaultInt){    int Result = GetPrivateProfileIntA(Section, Key, DefaultInt, INI_Name);    return Result;}

And finally in your INI, be sure to use the integers like I mentioned above :)

 

A sample portion of my INI:

***********************************************************************************************  Extender Information Security 2015 R2   Copyright © 2008-2015 New Team of Weapons and Tactics Organization. All rights reserved.   Visit https://www.teamofweaponsandtactics.com/ for updates, service announcements, and more.***********************************************************************************************EIS SYSTEM CONFIGURATION FILE (EIS_Config.ini)------------------------------------------------------------------------[CONTROLS]key_master=121                // Default: F10    - This key is required to be pressed alongside any other key in order to                            //                   initiate it.key_toggleEIS=69            // Default: E    - To toggle EIS on/off.key_toggleDash=68            // Default: D     - To toggle the Dashboard on/off.

Now as a general note, in case someone stumbles across this thread, GetAsyncKeyState is not the best solution since it does take effect even when the window isn't in focus (which is annoying) but hey, it works (and IsKeyJustUp didn't work for me) so that's why I use it. :)

 

Hope that helps! :D

  • Like 1

Share this post


Link to post
Share on other sites
vizzminzi

 

Awesome, i will give this a try :D

Thank you :D

 

but it didnt fix the issue :/

 

 

I never had any success with IsKeyJustUp (not sure why- but I'm sure I was missing something somewhere- but I looked for it and couldn't find it so I just stopped using it and used something else. :)

 

So how I do it:

// Toggle Key Vars (this is where I declared my key variables - which will be used to check if they are pressed later)SHORT key_master, key_toggleEIS, key_toggleOSD;// Function that I use to Initialize all default controls from my INI file.int init_ini_controls(){    // Controls    key_master = ini_readInt("CONTROLS", "key_master", 121);    key_toggleEIS = ini_readInt("CONTROLS", "key_toggleEIS", 69);    key_toggleOSD = ini_readInt("CONTROLS", "key_toggleDash", 68);    ... }

Then later in your script's main() or whatever, I use:

// In the beginning, call init_ini_controls() once to initialize the controls. You can also do this// in a constructor which would be the better way to do it like someone else did.// Use this to detect when the keys are pressedif (GetAsyncKeyState(key_master) && GetAsyncKeyState(key_toggleEIS)){   // Do whatever you need to do when the key is pressed. In this case, it happens when F10+E is pressed.   // Note that F10 = master_key and E = key_toggleEIS (by default)}

If you want to just do it when E is pressed then:

// Use this to detect when the keys are pressedif (GetAsyncKeyState(key_toggleEIS)){   // Do whatever you need to do when the key is pressed. In this case, it happens when F10+E is pressed.   // Note that F10 = master_key and E = key_toggleEIS (by default)}

Note the ini_readInt function I used was a straight copy & paste of Skorpro's helper functions (that I mentioned earlier):

int ini_readInt(char* Section, char* Key, int DefaultInt){    int Result = GetPrivateProfileIntA(Section, Key, DefaultInt, INI_Name);    return Result;}

And finally in your INI, be sure to use the integers like I mentioned above :)

 

A sample portion of my INI:

***********************************************************************************************  Extender Information Security 2015 R2   Copyright © 2008-2015 New Team of Weapons and Tactics Organization. All rights reserved.   Visit https://www.teamofweaponsandtactics.com/ for updates, service announcements, and more.***********************************************************************************************EIS SYSTEM CONFIGURATION FILE (EIS_Config.ini)------------------------------------------------------------------------[CONTROLS]key_master=121                // Default: F10    - This key is required to be pressed alongside any other key in order to                            //                   initiate it.key_toggleEIS=69            // Default: E    - To toggle EIS on/off.key_toggleDash=68            // Default: D     - To toggle the Dashboard on/off.

Now as a general note, in case someone stumbles across this thread, GetAsyncKeyState is not the best solution since it does take effect even when the window isn't in focus (which is annoying) but hey, it works (and IsKeyJustUp didn't work for me) so that's why I use it. :)

 

Hope that helps! :D

 

WOoo thanks for your huge effort.

 

i will give it a try :D

and tell you how it is going :)

 

Thanks :D

Share this post


Link to post
Share on other sites
ClareXoBearrx3R9

no problem :D

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

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