Sandbox+ for Saints Row IV

Wrote a fun little function if you guys want to try it out. It basically takes the current speed of the vehicle you're in and doubles it, and sets it as the max speed. Fun for aircraft!

EDIT: Set it to double instead of quadruple since for aircraft it's too drastic a change.

Code:
local CURRENT_VEHICLE = get_char_vehicle_name(LOCAL_PLAYER)
                local IS_IN_VEHICLE = character_is_in_vehicle(LOCAL_PLAYER)
                       if IS_IN_VEHICLE == false then
                    sandboxplus_message(" Player is not in a vehicle!")
                       else
                    CAR_SPEED = get_vehicle_speed(CURRENT_VEHICLE)
                 
                    CAR_SPEED = CAR_SPEED * 2
                 
                    -- Prevent the vehicle from reaching a top speed that the engine can't handle.
                    -- If it's less than 1000, run the function normally.
                    -- Otherwise, divide the max speed by 8.
                    -- CO-OP COMPENSATION
                 
                    if CAR_SPEED >= 1000 then
                 
                        CAR_SPEED = CAR_SPEED / 8
                 
                        vehicle_max_speed(CURRENT_VEHICLE, CAR_SPEED)
                        vehicle_speed_cancel(CURRENT_VEHICLE)
                     
                    else
                 
                        vehicle_max_speed(CURRENT_VEHICLE, CAR_SPEED)
                        vehicle_speed_cancel(CURRENT_VEHICLE)
                 
                    end
                 
                    sandboxplus_message(" Vehicle max speed set to "..CAR_SPEED)
                end
 
Last edited:
Care of Jeff Harris

sr_mods.jpg
 
I'm digging the SpongeBob reference with 'moar'. :)
 
Sorry if someone's already asked, but is there to a way to disable just super sprint in this mod?

No. Super sprint and super jump are tied together. You can't pick and choose one over the other.
 
Back
Top