hey guys im making a addition mod to Vehicle Camera First Person Mod by quantumsingularity86
https://www.saintsrowmods.com/forum...first-person-mod-by-quantumsingularity86.570/
where when you enter a vehicle and press the right mouse button it zooms you into first person view.
This is where my mod/addition takes over im writing a little lua mod that hides the play head whist driving in first person mode.
It detects when you click the right mouse button, the camera zooms in and my mod hides the head.
The way i got the head to dissapear was a modifcation of an existing item the dog tags necklace and messing around with some Obscured_slots & Obscured_VIDs to hide the head
The problem im having is when i add the dogtags to the player when they right click, this works fine but when you let go its ment to show the players head again.
the code i have sofar is as follows:
As you can see i've even tried using the players_naked(false) function to revert the changes but that seems to only strip the play of all clothes
Zoomed in and rotated camera backwards:
After releasing right mouse button :
Anyone know what im doing wrong or know of another way/function i could revert the players model back to normal?
Any help would be awesome
https://www.saintsrowmods.com/forum...first-person-mod-by-quantumsingularity86.570/
where when you enter a vehicle and press the right mouse button it zooms you into first person view.
This is where my mod/addition takes over im writing a little lua mod that hides the play head whist driving in first person mode.
It detects when you click the right mouse button, the camera zooms in and my mod hides the head.
The way i got the head to dissapear was a modifcation of an existing item the dog tags necklace and messing around with some Obscured_slots & Obscured_VIDs to hide the head
The problem im having is when i add the dogtags to the player when they right click, this works fine but when you let go its ment to show the players head again.
the code i have sofar is as follows:
Code:
function Vehcheck()
--[[
ripped from game_lib.lua
VT_AUTOMOBILE = 0
VT_MOTORCYCLE = 1
VT_AIRPLANE = 2
VT_HELICOPTER = 3
VT_VTOL = 4
VT_WATERCRAFT = 5
-- This means the player isn't in a vehicle.
VT_NONE = 6
]]
local oldVehicle = -1
local PlayerVeh = -1
print("VEHICLE CHECK LOADED!")
local HeadHidden = false
local oldHHidden = false
while true do
PlayerVeh = get_char_vehicle_type(LOCAL_PLAYER)
local item_name = "cm_neck_med_dogtags"
local wear_option = "cm_neck_med_dogtags.cmeshx"
local variant = "Material #410"
local sync_flag = SYNC_LOCAL
local add_to_wardrobe = false
local clear_facewear = false
local wear_permanently = false
if(PlayerVeh < 2) then
local RightMouseButtonPressed = player_action_is_pressed("CBA_OFC_SHOULDER_CAMERA")
HeadHidden = RightMouseButtonPressed
else
HeadHidden = false
end
if(HeadHidden ~= oldHHidden) then
if(HeadHidden == true) then
print("Changing ....!")
--customization_item_wear("cm_gasmask", "cm_mask_gasmask.cmeshx", "cm_mask_gasmask", true, SYNC_ALL, true, false)
customization_item_wear(item_name,wear_option,variant,add_to_wardrobe,sync_flag,clear_facewear,wear_permanently)
--customization_item_wear( "Cyrus Head","cyrus_hires_head.cmeshx","Cyrus",false,sync_flag,false,false)
print("Done!")
else
print("Reverting back...")
customization_item_revert( sync_flag ) -- this line doesn't seem to work!
delay(1)
--players_naked(false)
print("Done!")
end
end
oldHHidden = HeadHidden
delay(0.1)
end
end
Zoomed in and rotated camera backwards:
After releasing right mouse button :
Anyone know what im doing wrong or know of another way/function i could revert the players model back to normal?
Any help would be awesome