Mige Posted September 9, 2020 Share Posted September 9, 2020 (edited) Hey So I have been editing the base race scripts to allow getting out of the starting vehicle and change to whatever vehicle you find. - However I noticed u can walk through vehicles and also if I walk through a checkpoint instead of using a vehicle it will just finish the race for me.. can't seem to find where this stuff is handled so help would be appreciated. Edited September 9, 2020 by Mige Link to comment
AfuSensi Posted September 9, 2020 Share Posted September 9, 2020 I'm not sure how well this would work because the race resource is specifically built assuming players are in vehicles. This is where race handles checkpoint hits: https://github.com/multitheftauto/mtasa-resources/blob/master/[gamemodes]/[race]/race/race_client.lua#L700-L746 As you can see, it assumes a vehicle, and will return at if elem ~= g_Vehicle or isVehicleBlown(g_Vehicle) or getElementHealth(g_Me) == 0 or Spectate.active then return end Link to comment
Mige Posted September 9, 2020 Author Share Posted September 9, 2020 40 minutes ago, AfuSensi said: I'm not sure how well this would work because the race resource is specifically built assuming players are in vehicles. This is where race handles checkpoint hits: https://github.com/multitheftauto/mtasa-resources/blob/master/[gamemodes]/[race]/race/race_client.lua#L700-L746 As you can see, it assumes a vehicle, and will return at if elem ~= g_Vehicle or isVehicleBlown(g_Vehicle) or getElementHealth(g_Me) == 0 or Spectate.active then return end Yeah I have edited that part to: (with this im able to walk through the first checkpoint, but for some reason that causes the race to finish instead) if (elem ~= g_Vehicle and tostring(g_Vehicle) ~= "false") or isVehicleBlown(g_Vehicle) or getElementHealth(g_Me) == 0 or Spectate.active then Link to comment
AfuSensi Posted September 9, 2020 Share Posted September 9, 2020 If you follow the call chain, you will see a lot more vehicle dependencies. That's just the first place it checks for a vehicle. Link to comment
Mige Posted September 9, 2020 Author Share Posted September 9, 2020 9 minutes ago, AfuSensi said: If you follow the call chain, you will see a lot more vehicle dependencies. That's just the first place it checks for a vehicle. Ye, but this is the point where its checking the checkpoints so shouldnt the problem be here somewhere. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now