These are chat archives for hennysmafter/GTAV-SH-Mod

16th
Oct 2015
kopalov
@kopalov
Oct 16 2015 00:20
I've finally, after a few hours, made a breakthrough in those damn interiors :)
Henny Smafter
@hennysmafter
Oct 16 2015 00:21
You are now inside or did you just break your own interior out of frustration. :-)
kopalov
@kopalov
Oct 16 2015 00:21
Did you test ver. 0.7.8? Is it working?
No, I'm inside, all dialog options are working)
If 0.7.8 is working, I'll upload it now.
Henny Smafter
@hennysmafter
Oct 16 2015 00:21
Yes. I did test it. But just to be sure let me check again.
While it is strating can you have two scripts inside one lua file
Like local ccr1 = {} and local ccr2 = {}
Yes it is working
just bought a house. Needed to press E this is new? Or I am confused by my own buttons
kopalov
@kopalov
Oct 16 2015 00:25
Ok, this is my current version. It does not have any of your changes, because I want to keep stuff simple for me tot test.
Just buy any house and see what happens)
Oh, and how do I send files here?
This message was deleted
Ok, figured it out.
Henny Smafter
@hennysmafter
Oct 16 2015 00:26
Now everyone can dl
We also got a private chat!
You got my CIBUILD there.
kopalov
@kopalov
Oct 16 2015 00:27
It's ok, this is just a test build.
Yes, I got it now.
Henny Smafter
@hennysmafter
Oct 16 2015 00:27
Great let me delete my save,hot,cus and start 08
kopalov
@kopalov
Oct 16 2015 00:27
I deleted public version just in case.
Now will upload 0.7.8 to gtaforums.
Henny Smafter
@hennysmafter
Oct 16 2015 00:28
okey did not know that that was possible
Alright. Did you see the credits are you okay with that?
Don't want to force you!
Are all interiors working or do I need to go to a specific place. Going to start in a minute
kopalov
@kopalov
Oct 16 2015 00:32
Yes, sure) I'm ok, and you actually did a good job organizing staff and writing changelog. Only thinh is, can we keep h and ht locals together in the beginning? It is easier to find them that way.
Only houses have interiors for now. Not hotels.
Henny Smafter
@hennysmafter
Oct 16 2015 00:33
I am not sure what you mean by "can we keep h and ht locals together in the beginning? "
I bought the house in Sandy Shores(was my closest location) should I walk to the door and then it autoloads or should I press something.
kopalov
@kopalov
Oct 16 2015 00:36
yes, walk to the door
Henny Smafter
@hennysmafter
Oct 16 2015 00:36
I needed to walk away a bit more
kopalov
@kopalov
Oct 16 2015 00:36
does it work?
I uploaded 0.7.8 btw.
Henny Smafter
@hennysmafter
Oct 16 2015 00:36
This is brilliant. Amazing.
Let me enjoy a bit more. I report in a minute
kopalov
@kopalov
Oct 16 2015 00:38
Thanks) Took me 5 hours to remember what I had in mind when writing that code)
Actually, for now exit mechanics in some interiors are broken, so you can press C to teleport to my testing location.
Henny Smafter
@hennysmafter
Oct 16 2015 00:38
I was just going to ask that. Help I am stuck! No problem.
kopalov
@kopalov
Oct 16 2015 00:40
I hope that soon I'll find entrance to mid-class apartment, so we can assign each house and hotel its interior type.
For now interior 9 is just a placeholder for that mid-class apart.
Henny Smafter
@hennysmafter
Oct 16 2015 00:41
Alright bought the house C and also there I can't get outside. I assume I should be spawned when reaching the door?
I do see a menu trying to break through but it goes too fast away for me to make up what it says.
I am loving this interiors, really great job you have done in 5 hours it is incredible.
kopalov
@kopalov
Oct 16 2015 00:44
Yes, door should take you outside in 100 msec, but for now it's broken.
Bugs, bugs everywhere)
Also, can you please see a description for our mod on gtaforums? I updated it, but my English is not very good, so I could make mistakes.
Henny Smafter
@hennysmafter
Oct 16 2015 00:46
Why not do an if else in the menu. If outside show button go inside if inside show button go outside
checking it now
I don't see any errors right now a couple of Grammar stuff but I will rewrite those parts and send them to you.
Things like: so you will have to specify path you want your savefiles to be saved in. should be so you will have to specify the path you want your save files to be saved at.but that is so unimportant.
kopalov
@kopalov
Oct 16 2015 00:48
It's much harder than that. Outside part is handled by sh.safehouse(), sh.enterhouse() and sh.interior() partly. Inner part is done in sh.lookexit() and sh.looksave(), so menu is different.
Henny Smafter
@hennysmafter
Oct 16 2015 00:48
The main thing is we got interiors yippiekayee
I haven't gone through the 0.8 code that much. I did spend a part of the evening on another mod from myself. I am combining two mods into one. Both are from myself but a bit stupid to have them seperated
Will share when it is ready to be released.
It allows for a easy to use Cruise Control, Clean, Repair with keyboard or controller.
kopalov
@kopalov
Oct 16 2015 00:51
Ok. Fixed that grammar staff.
What are your mods about, if it's not a secret? :)
Oh, you answered before I asked)
Henny Smafter
@hennysmafter
Oct 16 2015 00:52
There are other mods out there who are doing the same thing but most of them adds tons and tons of stuff. I like for instance the left and right blinkers but I never ever use them while driving in GTA I drive way too fast for that.
kopalov
@kopalov
Oct 16 2015 00:54
I'll work on exiting interior for an hour more, probably, and go to bed. It's 4 AM in Moscow, but I have no job tomorrow, so I'm glad I finally "reopened" my own code for myself) It was the hardest part.
Also, you asked about a new name. I think we better keep something "Safehouse" related, since it kind of distinguishes this mod from others.
Henny Smafter
@hennysmafter
Oct 16 2015 00:56
Yeah I think you are right about that. And I understand that it is really disappointing when you got a*hoes on GTA 5 Mods complaining and some even putting really disturbing remarks towards creators of mods. I gave my opinion on GTA Forums and I literally received death treats.
I am ecstatic to work with you and really happy that you are back. I am sure that there is a whole community who is going to enjoy this mod and the others to come.
Okey I am going to let you dive back into the code. And shut up for now.
kopalov
@kopalov
Oct 16 2015 01:00
I'm glad that you actually sent me that message, because deep inside I always felt some incompleteness leaving this mod in beta state. I put too much work in coding it, had to learn LUA from scratch, so if we manage to finish it (I'm sure we will), I'll be very happy. Thank you for your support, you are a very nice person :)
Henny Smafter
@hennysmafter
Oct 16 2015 01:02
@prexis74
Thank you for the compliment, and hell yeah we are going to finish it. If you need my help just ping me and I will be there a.s.a.p. You can ping people in this chat by using @username you can ping everyone connected to this chatroom by @/all
kopalov
@kopalov
Oct 16 2015 01:47
Added exit mechanics. It is buggy for now, but at least functioning. Next step is to create spots for saving game inside houses and add interior mechanics to hotels and custom savespots. @hennysmafter
Henny Smafter
@hennysmafter
Oct 16 2015 02:04
Wow really cool. Saw the PM also and are thrilled that you merged it already.
@prexis74 Would you like me to go to all locations and specify the interiors?
kopalov
@kopalov
Oct 16 2015 02:07
Oh, I forgot two your questions. You can have local ccr1 = {} and local ccr2 = {}, but those are arrays -- tables of data. You can have as many locals in lua as you want. If you want to add a new script, better do a global function, like
function sh.newfunct()
There are also local functions, but they sometimes conflict with normal functions. Example:
local function sh.newfunct()
Henny Smafter
@hennysmafter
Oct 16 2015 02:08
Are you available to look over the code so far! I am merging two into one and it keeps conflicting.
kopalov
@kopalov
Oct 16 2015 02:10
You can send me conflicting parts of code, so I can look into it. Do you use SDK lua with console?
And sorry that I kind of messed up our version progression) Got too excited with 0.8s)
Henny Smafter
@hennysmafter
Oct 16 2015 02:11
Not at the moment I had that in place but needed to do a reinstall because of Rockstar update messing up everything.
So I went to the quickest way of getting the mods working for a weekend of gaming.
But need to get the sdks back in order.
I will send you by PM.
Done.
kopalov
@kopalov
Oct 16 2015 02:12
I think that first I should go through all 95 houses and choose some we can remove. Because 95 is a little bit too much) And we have a custom safehouse mechanic, which sadly very few people know.
Henny Smafter
@hennysmafter
Oct 16 2015 02:13
You are not the only one who is excited about 0.8 I am loving it too.
kopalov
@kopalov
Oct 16 2015 02:13
So first remove some houses, leave like 65 in different parts of the map, and then we'll assign interiors, so you can surely help with that.
Henny Smafter
@hennysmafter
Oct 16 2015 02:14
I went with merging the two of them because it allows for more price ranges. Please don't get me wrong I love the custom houses but the price is always 750000 I have been looking into randomizing but no luck so far.
So I kept thinking like having a option first like low house med house highend house
and then within that option it goes random between a min and max
kopalov
@kopalov
Oct 16 2015 02:16
Yes, that's a good idea. Lets add it to our to-do list.
Henny Smafter
@hennysmafter
Oct 16 2015 02:16
1: You press the button custom house
2: You get the options for housetype and interior
3: It shows the price
kopalov
@kopalov
Oct 16 2015 02:16
Yep. And you also choose interior you want.
And what other custom sh options you have in mind?
Henny Smafter
@hennysmafter
Oct 16 2015 02:18
Specifically for the custom creation process or the entire mod?
kopalov
@kopalov
Oct 16 2015 02:19
Oh, I see you added them: house type and interior. Yes, we definitely should implement that.
Henny Smafter
@hennysmafter
Oct 16 2015 02:20
For the entire mod I would love to have:
  • Working wardrobe (not sure if that goes with interiors already)
  • Working garage doors (this is going to be a challenge)
  • Making the mobile phone the UI (internet for buying/renting/selling etc.)
Ow forgotten the most important point of them all!

Interiors

Hey we already got them. YEAHHHHHHHHHHHH
kopalov
@kopalov
Oct 16 2015 02:22
Lets set roadmap for 8.3 and 8.4 like this:
0.8.3 -- save and exit mechanic in interiors, interiors for hotels
0.8.4 -- all interiors chosen, house list shorten, custom sh creation options added, Testing if controller keys can be added together with keyboard.
Starting the search for the websites.
0.9 -- New GUI, New Camerawork, possibly wardrobe (first I need to make sure it's doable at all)
The same as wardrobes goes to mobile phone UI. I think there are natives for that, but I never managed to get them working :(
Sadly, a lot of natives in GTA 5 are only for .asi and C+/C++, so we do not have them in LUA.
Your mod does not return any errors in sdk. What is conflicting?
Henny Smafter
@hennysmafter
Oct 16 2015 02:26
Yes that is true I already looked into converting the script but that is going to be a challenge!
All functions of the mod are not working
Do you use controller or keyboard?
kopalov
@kopalov
Oct 16 2015 02:28
Keyboard. I'm looking into code now.
Henny Smafter
@hennysmafter
Oct 16 2015 02:29
When num1 is pressed the car is fixed and num7 the car gets clean
ctrl+w is activate cruise control
pressing w, s, space or flying disengages cruise control
This exit mechanic that you build in is working great
kopalov
@kopalov
Oct 16 2015 02:32
First, I recommend including console messages for debugging in the beginning and end of every function, like
print("repair start")
...
print("repair end")
So you can always see what worked and what did not.
Henny Smafter
@hennysmafter
Oct 16 2015 02:33
Oh I love those tips. I will add them. What I discovered is when I got them separate in two mods it worked flawless for months.
BTW Just bought a couple of houses and going in and out every time like it was meant to be! Really cool.
kopalov
@kopalov
Oct 16 2015 02:36
First, lets include all dynamic locals (those that change ingame) into either tick or any function. These
local playerPed = PLAYER.PLAYER_PED_ID()
local player = PLAYER.GET_PLAYER_PED(playerPed)
local playerExists = ENTITY.DOES_ENTITY_EXIST(playerPed)
need to go into tick, because last one depends on first
Henny Smafter
@hennysmafter
Oct 16 2015 02:37
those belong to
  -- Added clean and repair
    if(playerExists) then
        if(PED.IS_PED_IN_ANY_VEHICLE(playerPed, true)) then
            local veh = PED.GET_VEHICLE_PED_IS_IN(playerPed,true)
            ----Keyboard
            --Repair
            if(get_key_pressed(97))then
                VEHICLE.SET_VEHICLE_FIXED(veh)
            end
            --Clean
            if(get_key_pressed(103))then
                VEHICLE.SET_VEHICLE_DIRT_LEVEL(veh, 0)
            end
            ----Controller
            --Repair
            if(CONTROLS.IS_CONTROL_PRESSED(2,86))then
                VEHICLE.SET_VEHICLE_FIXED(veh)
            end
            --Clean
            if(CONTROLS.IS_CONTROL_PRESSED(2,80))then
                VEHICLE.SET_VEHICLE_DIRT_LEVEL(veh, 0)
            end
        end
    end
You can write code by using three times `
and close with another three
1.png
The original script is this:
local carhotkeys ={}
function carhotkeys.tick()
local playerPed = PLAYER.PLAYER_PED_ID()
    local player = PLAYER.GET_PLAYER_PED(playerPed)
    local playerExists = ENTITY.DOES_ENTITY_EXIST(playerPed)
    if(playerExists) then
        if(PED.IS_PED_IN_ANY_VEHICLE(playerPed, true)) then
            local veh = PED.GET_VEHICLE_PED_IS_IN(playerPed,true)
            ----Keyboard
            --Repair
            if(get_key_pressed(97))then
                VEHICLE.SET_VEHICLE_FIXED(veh)
            end
            --Clean
            if(get_key_pressed(103))then
                VEHICLE.SET_VEHICLE_DIRT_LEVEL(veh, 0)
            end
            ----Controller
            --Repair
            if(CONTROLS.IS_CONTROL_PRESSED(2,86))then
                VEHICLE.SET_VEHICLE_FIXED(veh)                
            end
            --Clean
            if(CONTROLS.IS_CONTROL_PRESSED(2,80))then
                VEHICLE.SET_VEHICLE_DIRT_LEVEL(veh, 0)
            end
        end
    end
end 
return carhotkeys
Wait a minute I am missing the function.
kopalov
@kopalov
Oct 16 2015 02:42
Actually, for me Num1 fixes car
Henny Smafter
@hennysmafter
Oct 16 2015 02:42
??? He how can that be!
kopalov
@kopalov
Oct 16 2015 02:43

I included locals in tick, like this:
'''
function rvc.tick()
-- variables
local playerPed = PLAYER.PLAYER_PED_ID()
local player = PLAYER.GET_PLAYER_PED(playerPed)
local playerExists = ENTITY.DOES_ENTITY_EXIST(playerPed)
player = PLAYER.GET_PLAYER_PED(playerPed)
playerVehicle = PED.GET_VEHICLE_PED_IS_USING(playerPed)
playerVehicleSpeed = ENTITY.GET_ENTITY_SPEED(playerVehicle)
isPlayerDriving = (VEHICLE.GET_PED_IN_VEHICLE_SEAT(playerVehicle, -1) == playerPed)
playerVehicleHealth = VEHICLE.GET_VEHICLE_ENGINE_HEALTH(playerVehicle)

-- variables end

'''

Yep, Num1 is now definitely working. Will check the rest
Henny Smafter
@hennysmafter
Oct 16 2015 02:44
Try the ' next to the 1 key
~
Did it work before your change or after?
kopalov
@kopalov
Oct 16 2015 02:45
After.
cruise control on ctrl-w is also working
And the on-screen message about it
Henny Smafter
@hennysmafter
Oct 16 2015 02:48
Yes what about cleaning?
kopalov
@kopalov
Oct 16 2015 02:48

Actually, I changed your code like this:
'''function rvc.tick()
-- variables
local playerPed = PLAYER.PLAYER_PED_ID()
local player = PLAYER.GET_PLAYER_PED(playerPed)
local playerExists = ENTITY.DOES_ENTITY_EXIST(playerPed)
playerVehicle = PED.GET_VEHICLE_PED_IS_USING(playerPed)
playerVehicleSpeed = ENTITY.GET_ENTITY_SPEED(playerVehicle)
isPlayerDriving = (VEHICLE.GET_PED_IN_VEHICLE_SEAT(playerVehicle, -1) == playerPed)
playerVehicleHealth = VEHICLE.GET_VEHICLE_ENGINE_HEALTH(playerVehicle)

-- variables end'''

Why is there no code for me, even if I put '''? :(
Oh, it's the other symbol!
Henny Smafter
@hennysmafter
Oct 16 2015 02:50
I cant write it so then i upload it.
kopalov
@kopalov
Oct 16 2015 02:51
I don't know about Num7 and cleaning, since my car is not dirty at all. Will try to find one in the countryside.
Henny Smafter
@hennysmafter
Oct 16 2015 02:52
Don't you use a trainer?
I use the EnhancedNativeTrainer a real joy to use.
Cleaning is also working
kopalov
@kopalov
Oct 16 2015 02:54
Yes, I do. But getting car dirty is really hard)
So what is not working?
Henny Smafter
@hennysmafter
Oct 16 2015 02:54
Made the changes as you said the only thing not working are all controller options. Which is also very logic. The ones used are different then needed.
Open trainer > Vehicles > Paint > Car Dirt > Full dirt
kopalov
@kopalov
Oct 16 2015 02:55
And btw your GUI text is really pretty. Maybe, we could make our sh mod look like that.
Henny Smafter
@hennysmafter
Oct 16 2015 02:55
Ehm I hate to say it ain't mine GUI but from another mod.
Same goes with part of the code in this mod. I mean CruiseCleanRepair not SavehouseMod
kopalov
@kopalov
Oct 16 2015 02:56
In my thainer there is no such option. But I'm glad it works now anyway.
If it is not yours, you can still look into the code and find out how to make text look pretty. Because we need some better text.
Henny Smafter
@hennysmafter
Oct 16 2015 02:58
Oh yes. I am going to do that. No problem.
That is the one I am using basically always.
Bye the way. Thank you very much for looking to my mod really appreciate the help and loved the teaching part.
kopalov
@kopalov
Oct 16 2015 03:03
No problem)
Ok, I need to get some sleep. BTW, where are you from (like what part of the globe)? I ask just to find out what is the best time for communication between us. My time is GMT+4, I think. Moscow, Russia. Now it's 6 AM. I hope it's not as late (or early) where you live)
Anyway, good night)
Henny Smafter
@hennysmafter
Oct 16 2015 03:10
For me it is 5:10 I am currently in Germany but travel a lot.
kopalov
@kopalov
Oct 16 2015 03:10
Oh, and actually for 0.8.4 we need some ideas for realtor offices. Can you take that?
Henny Smafter
@hennysmafter
Oct 16 2015 03:10
You mean locations and such
and interiors
kopalov
@kopalov
Oct 16 2015 03:11
Ok Guten Morgen it is then)
Yes, we need some locations for them. Like 3 in cities, 2 in countrysites. For interior we have Michael's psychologist's office.
Will it fit?
Henny Smafter
@hennysmafter
Oct 16 2015 03:12
The psychologist's office is a perfect fit for that minus the idiot in it.
Alright updated the milestones.

Milestones (PROPOSED)

Version 0.9.0 BETA CI BUILD

  • New GUI.
  • New Camerawork.
  • Testing wardrobe possibility.
  • Testing mobile phone UI.
  • Buying/Selling/Renting can be done by website.

Version 0.8.4 BETA CI BUILD

  • Adding interior references to house list.
  • Removing houses to allow more custom houses.
  • Adding custom house creation options.
  • Testing if controller keys can be added together with keyboard.
  • Starting the search for the websites.
  • Defining locations and interiors for Realtor Offices.

Version 0.8.3 BETA CI BUILD

  • Fine tuning of save and exit mechanic in interiors.
  • Adding interiors to hotels and apartments.
  • Redefine interiors based on house type.

Version 0.8.2 BETA CI BUILD

  • Overall cleanup and restructering of code.
  • Assigned interior to all houses.
I will take care of the offices and wish you a very good morning I guess. I am going to end the night as well. Ehm early morning.
PS: In 8.3 I add the changelog for 8.2
kopalov
@kopalov
Oct 16 2015 11:03
Coded for half an hour this morning and made a breakthrough)
Build 2 of 0.8.2 now has working save mechanics and blip for savespots inside house (I tested only with Floyd's), even though GUI menu is bugged for now. Sometimes it does not disappear, and there is always a third button, which is not pressable.
@hennysmafter if you have some free time, please go through interiors in 8.2b2 and mark coords for save (some of my choices were just for testing) and wardrobe.
I left only 8 houses, each with different interior to test.
kopalov
@kopalov
Oct 16 2015 14:17
BTW, what does CI BUILD mean? :)
kopalov
@kopalov
Oct 16 2015 14:54
Also, just a notice. Most of my time on computer I spend on Linux, I have to boot Windows to launch GTA. So I often will not be able to test some things straight away.
Henny Smafter
@hennysmafter
Oct 16 2015 15:11
Hey good day. I did read your previous messages but was a bit too busy with my job which sorry comes first.
CI BUILD = Continues Integration Build
Meaning: That we are continuesly working on it. A bit of the same as WIP
Difference as far as I understand is that CI BUILDs can be distributed and WIP should not be distributed. In the modding world this does not say a thing.
But Windows 11 WIP I would not download because there is no guarantee it will be finished, skipped or removed!
Windows 11 CI BUILD I would try because this will become finished one day and is going to be the next step in their platform.
CI BUILDs are also known as Nightly Builds or inbetween steps between beta/alpha versions.
Bye the way. Fixed the controller problem in my mod! Apperantly for some buttons and some mods you need to use for instance 2,48 instead of 2,86
Henny Smafter
@hennysmafter
Oct 16 2015 15:16
Don't ask me why it is in one .lua 48 and in the other .lua 86 because that I haven't figured out.
:point_up: October 16, 2015 1:03 PM
  1. Do you want me to go into each of those 10 houses and go to the best spot for the save spot and get the coordinates.
  2. I think my mod shows a way to remove that extra button. I am going to convert the GUI to my own and then we can duplicate/rename and use it for SavehouseMod. In my mod I removed about 10 buttons, not sure though have to look into it. Bye the way if you press Numpad . (Numpad with a .) you can see the GUI menu. I think you like it.
  3. While creating those coordinates for savespots you want me to get the coordinates for wardrobes as well.
Henny Smafter
@hennysmafter
Oct 16 2015 15:22
I want add the key reference for controller to 0.8.3 what do you think. Below a example:
-------------------------------------------------------------------------------------
----------------------------- CONTROLLER KEY REFERENCE ------------------------------
-------------------------------------------------------------------------------------
-- Use in code 'CONTROLS.IS_CONTROL_PRESSED(2,X)' without ''.
-- Replace X with one of the numbers below, most have multiple numbers you can try.
-- Thanks goes out to H1Vltg3 who came up with these codes.
--
-- A    - 73 - 70 - 21 - 18
-- X    - 99 - 22
-- Y    - 75 - 56 - 53 - 49 - 23
-- B    - 80 - 45
--
-- L3   - 86 - 28
-- R3   - 79 - 93 - 50 - 29 - 26
--
-- LB   - 68 - 89 - 38 - 37
-- RB   - 69 - 76 - 90 - 55 - 44
-- LT   - 77 - 72 - 88 - 91 - 25 - 15 - 10
-- RT   - 78 - 71 - 87 - 92 - 46 - 24 - 14 - 11
--
-- DPUP - 42 - 27
-- DPDN - 48 - 43 - 20 - 19
-- DPLT - 85 - 58 - 52 - 47
-- DPRT - 74 - 54 - 51
--
-- RSRT - 66 - 13 - 6
-- RSLT - 5
-- RSUP - 3
-- RSDN - 67 - 12 - 4 - 2
--
-- LSRT - 64 - 59 - 35 - 30 - 9 - 1
-- LSLT - 63 - 34
-- LSUP - 61 - 40 - 32
-- LSDN - 60 - 41 - 39 - 33 - 31 - 8
--
-- CTRL - 62 - 36
--
--
Henny Smafter
@hennysmafter
Oct 16 2015 16:25
Do you know how to calculate in lua?
    -- disengage cruise control on acceleration and remember vehicle current speed
    if CONTROLS.IS_CONTROL_PRESSED(2,71) and isPlayerDriving then
        ccr.increaseCruise()
    end

    function ccr.increaseCruise()
        print("set increase speed start")
        setIncreaseSpeed = playerVehicleSpeed
        setIncreaseSpeed = math.floor(setIncreaseSpeed)
        print("set increase speed end")
    end
I need to do a +1 i think so that the car keeps speeding up while pressed.
Henny Smafter
@hennysmafter
Oct 16 2015 16:34
@prexis74
Henny Smafter
@hennysmafter
Oct 16 2015 16:43
Current code
    -- keep cruise control engaged but allow acceleration and remember vehicle current speed
    if CONTROLS.IS_CONTROL_PRESSED(2,71) and isPlayerDriving then
        ccr.rememberCruise()
        ccr.increaseCruise()
    end
    -- return to cruise mode on release
--    if CONTROLS.IS_CONTROL_RELEASED(2,71) and isPlayerDriving then
--        ccr.returntoCruise()
--    end

    function ccr.rememberCruise()
        print("set remember speed start")
        setRememberSpeed = playerVehicleSpeed
        setRememberSpeed = math.floor(setRememberSpeed)
        print("set remember speed end")
    end

    function ccr.increaseCruise()
        print("set increase speed start")
        setIncreaseSpeed = playerVehicleSpeed
        setIncreaseSpeed = math.floor(setIncreaseSpeed + 1)
        print("set increase speed end")
    end

    function ccr.returntoCruise()
        print("set returnto speed end")
        setReturntoSpeed = setRememberSpeed
        setReturntoSpeed = math.floor(setReturntoSpeed)
        print("set returnto speed end")
    end
It is now running both functions. The + 1 is working because I can drive 1 mile faster while pressed. So need to do a bit of work
Henny Smafter
@hennysmafter
Oct 16 2015 18:32
@prexis74 After lots of hours. I finally understand why it is not working. Deleted and started again. I need to do what you did and create a savefile where it stores the Cruise speed. Can you help me with that?
Henny Smafter
@hennysmafter
Oct 16 2015 18:40
I uploaded the files in PM, I included the local path but going further in Szabo and Safehouse code it became too complicated for me. Did not know what parts to copy and adapt and which items where related.

What I want to achieve is when enabling Cruise Control it saves that speed to the save file it overrides the 1 table row every time you press enable cruise control. Then I want another button that retrieves that saved value and make the car speed up to that speed.

It will go to that speed immediately as it has no physics as in real world and I don't know if it can be made that this happens gradually.

:point_up: October 16, 2015 5:16 PM

I am now going to do this!

Henny Smafter
@hennysmafter
Oct 16 2015 18:55
GTA5 2015-10-16 20-53-21-92.jpg
GTA5 2015-10-16 20-53-35-86.jpg
It was the first house I tested going to test the others. I fell out of the sky into the Psychologist office kind of like a no-clip
Don't know if this is a issue but after buying you have to walk at least 5 meters away and back before you can activate the menu. No biggie!
kopalov
@kopalov
Oct 16 2015 18:58
You do not need savefile for that. Just use table.insert, like this:
local cruisespeed={}
if (get_key_pressed(Keys.X)) then
speed=... // get veh speed
table.insert(cruisespeed, (#cruisespeed+1), speed)
...
Adding permanent savefiles is VERY complicated. You need to convert strings to arrays, integers to strings, then do the opposite.
Henny Smafter
@hennysmafter
Oct 16 2015 19:00
So this piece of code is the only thing I need?
what do I need to do with speed=...
kopalov
@kopalov
Oct 16 2015 19:01
Just use arrays {}, which are basicly tables.
table.remove removes an item or a row,
like
table.remove (tblA, 2) removes second position in table
Henny Smafter
@hennysmafter
Oct 16 2015 19:02
Yeah, the thing is I have no clue how those tables work! Can't find easy to go instructions either.
kopalov
@kopalov
Oct 16 2015 19:02
I don't think I fully understand what you are trying to accomplish.
Can you give me an in-geme example?
Like describe what needs to happen in what order.
Henny Smafter
@hennysmafter
Oct 16 2015 19:03

2 options

  1. You are driving with 50 miles and press a button that activates cruise control(already working)
  2. Cruise is set at your speed now you want to overtake so you press the accelerator this disables cruise and allows you to go faster.
  3. After overtaking you want to reactivate the previous cruise speed by either pressing the same button and keeping it pressed or simple pressing another button.

or

  1. You are driving with 50 miles and press a button that activates cruise control(already working)
  2. Cruise is set and now you want to overtake so you accelerate cruise stays enabled but car accelerates.
  3. You stop accelerating and now because cruise is still enabled goes back to your set speed
Bye the way the current code is in the PM. I added your credits as well because of the help yesterday and today. Hope you don't mind. Ow if you try the mod pressing num . will show the GUI menu! I like it.
kopalov
@kopalov
Oct 16 2015 19:10
I'm looking into it now. Will reply in 5 mins
Henny Smafter
@hennysmafter
Oct 16 2015 19:11
Super thank you very much!
In the meanwhile I am going through those houses.
So got a crash. And I think I know where it is. When I bought the first house it started doing a function over and over and over. Forgotten the name so I am retracing my steps and let you know what exactly.
Henny Smafter
@hennysmafter
Oct 16 2015 19:23
thisiswhathappens.png
This happens after you buy the house in the pictures above.
Going to restart now and buy another house.
kopalov
@kopalov
Oct 16 2015 19:27
This is working as designed. If you come inside, mod starts looking for exit and save spot. Crash was caused by something else.
Henny Smafter
@hennysmafter
Oct 16 2015 19:27
Yes crash was my own fault, I had PS and GTA 5 at the same time on that won't work.
So I am trying now first the other houses
kopalov
@kopalov
Oct 16 2015 19:36
What I did is closer to your second variant:
"
You are driving with 50 miles and press a button that activates cruise control(already working)
Cruise is set and now you want to overtake so you accelerate cruise stays enabled but car accelerates.
You stop accelerating and now because cruise is still enabled goes back to your set speed"
This message was deleted
kopalov
@kopalov
Oct 16 2015 20:03
@hennysmafter to 0.9 we should add retailer offices integrated. I was thinking about ways to implement them and maybe I've found a pretty easy one. Will test it today or tomorrow.
Henny Smafter
@hennysmafter
Oct 16 2015 20:04
I add it to the milestone

Milestones (PROPOSED)

Version 0.9.0 BETA CI BUILD
  • New GUI.
  • New Camerawork.
  • Testing wardrobe possibility.
  • Testing mobile phone UI.
  • Buying/Selling/Renting can be done by website.
  • Retail offices integrated.
kopalov
@kopalov
Oct 16 2015 20:05
I'm going to have a supper, so will be back in 45 mins or so. Tonight I will start adding interiors for hotels and aparts, also will look into custom house creation options and realtor implementation.
Henny Smafter
@hennysmafter
Oct 16 2015 20:05
Okey enjoy your supper. I will be here. I will upload the pics in two minutes.
kopalov
@kopalov
Oct 16 2015 20:06
Maybe, we should put to-do's and milestones in separate file in Github repo, so it's easy to see all the times?
Did you also write down coords for different places inside interiors?
Henny Smafter
@hennysmafter
Oct 16 2015 20:06
I will look into that.
No not yet. I work in steps so just tested all interiors but let me upload the pics.
Now I am going to really enjoy the full size of the interiors and get the coordinates.
Ow and test CCR mod
Henny Smafter
@hennysmafter
Oct 16 2015 20:09
Try to use the code inside the .txt it looks nicer. But not important.
kopalov
@kopalov
Oct 16 2015 20:10
Also, do you by chance know how to make fonts in files on GitHub colored according to programming language and more readable?
Henny Smafter
@hennysmafter
Oct 16 2015 20:10
Yes I do
kopalov
@kopalov
Oct 16 2015 20:11
Nice. Because for me it's just grey.
Henny Smafter
@hennysmafter
Oct 16 2015 20:11
1.png
So you use those symbols and then you type the programming language.
This is css
This is lua
kopalov
@kopalov
Oct 16 2015 20:12
No, I mean the GitHub site, not Gitter.
Tried it there, no luck.
Henny Smafter
@hennysmafter
Oct 16 2015 20:12
Ow...
kopalov
@kopalov
Oct 16 2015 20:13
kde11.png
Here is what it looks like for me :)
Henny Smafter
@hennysmafter
Oct 16 2015 20:14
Yes for me too. That is probably because it ain't lua code used but plain text.
I send a pull request did you receive it.
kopalov
@kopalov
Oct 16 2015 20:16
Yes, merged it already.
Ok, I'm off to eat)
Henny Smafter
@hennysmafter
Oct 16 2015 20:16
Enjoy your meal speak to you later.