Skip to content
This repository has been archived by the owner on Feb 11, 2025. It is now read-only.

Commit

Permalink
fixes :3
Browse files Browse the repository at this point in the history
  • Loading branch information
auriafoxgirl committed Jun 27, 2023
1 parent 4326282 commit 4655a7b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
20 changes: 18 additions & 2 deletions RCcar/RCmain.lua
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,29 @@ Input.Start.press = function ()
RC.engine = not RC.engine
Camera.mode = RC.engine
if RC.engine then
pings.GNRCcarCtrlSteer(0)
pings.GNRCcarCtrlThrottle(0)
local steer = 0
if Input.Left:isPressed() then
steer = steer + 1
end
if Input.Right:isPressed() then
steer = steer - 1
end
pings.GNRCcarCtrlSteer(steer)
local throttle = 0
if Input.Forward:isPressed() then
throttle = throttle + 1
end
if Input.Backward:isPressed() then
throttle = throttle - 1
end
pings.GNRCcarCtrlThrottle(throttle)
if player:isLoaded() then
Camera.dir = RC.mat.c3.xz
end
host:setActionbar('[{"text":"Remote Controll Mode: "},{"text":"Enabled","color":"green"}]')
else
pings.GNRCcarCtrlSteer(0)
pings.GNRCcarCtrlThrottle(0)
host:setActionbar('[{"text":"Remote Controll Mode: "},{"text":"Disabled","color":"red"}]')
end
if respawn_time_check > 5 then
Expand Down
2 changes: 1 addition & 1 deletion RCcar/armsHider.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local RC = require("RCcar.RCmain")
events.RENDER:register(function (delta, context)
local hide = (context ~= "FIRST_PERSON" or not RC.engine)
local hide = (context ~= "FIRST_PERSON" or not RC:getCarProperties().engine)
vanilla_model.RIGHT_ARM:setVisible(hide)
vanilla_model.RIGHT_ITEM:setVisible(hide)
vanilla_model.RIGHT_SLEEVE:setVisible(hide)
Expand Down

0 comments on commit 4655a7b

Please sign in to comment.