[SCRIPT][WIP] Simple Waypoint Deleter
Aight so this mod is supposed to delete a waypoint at the touch of a button for ease-of-use. I have a working version, but I'm working on a version that reads an ini file. It doesn't work... I have narrowed the problem down to something to do with the key or ini file. If someone could tell me what is wrong, I'd greatly appreciate that
Here is my source(Ignore my comments for dummies):
#include "script.h" // GTAV Library; This includes all GTA functions and stuff
#include "IniReader.h" // Reads .ini files: https://www.codeproject.com/kb/cpp/inireader.aspx
CIniReader iniReader(".\delmarker.ini"); // Opens delmarker.ini
const char temp = iniReader.ReadString("config", "Key", "VK_BACK"); // Gets the key and stores it in a char
DWORD key = (DWORD)temp;
if (GetAsyncKeyState(key)) // Checks if key was pressed
UI::SET_WAYPOINT_OFF(); // Removes waypoint
AUDIO::PLAY_SOUND(-1, "SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0, 0, 1); // Plays a sound
while (true) // Infinite loop
update(); // Calls the function defined above
WAIT(0); // Waits
// Ignore this below
main(); // Calls main function
Make a empty .ini file and call it
Inside the: Quick_Waypoint_Remover.ini
Inside the source i send you there is a default key set Thats L
You can change that in the source to your liking but remember when people edit the .ini thats the key that is used
Tell me if this helped you. Feel free to use it.
There is another way to make a .ini but it's more complicated and this is maybe a good begin to practice
@Rjvisser01 Thanks so much. I can't test it right now, but when I can, I'll let you know if it works or not.
Sure no worries
@Rjvisser01 I'm very grateful for your help, however I don't know any C#. See, the problem with my code is probably my char* to DWORD conversion. Or simply my syntax of the iniReader class. If you could help me with that, that would be awesome!
No problem mate
I have made the script for you.
Added the .ini and added the source code so you can edit it read it use it :D
The script works so test it do anything you like with it. you can rename it :D
I have send you the Download link ( DropBox ) in a message on the Gta 5 forum.
@Rjvisser01 Thank you SOOOO MUCH
no problem anytime
Why you using ++ for this
This post is deleted!