RekZ Posted April 23, 2022 Share Posted April 23, 2022 (edited) Hello, i'm looking for some way to fast the weapon zoom when i'm aiming. Maybe i can edit the flags using ? setWeaponProperty Edited April 23, 2022 by RekZ Link to comment
Spakye Posted April 24, 2022 Share Posted April 24, 2022 Hello, a while ago i was trying to create a binocular script and i had to do something a bit similar. I couldn't find a way to do exactly what i wanted but it worked like that : function sniperAutoZoom() local weapon = getPedWeapon(localPlayer) if weapon == 34 then setPedControlState(localPlayer, "zoom_out", true ) else setPedControlState (localPlayer, "zoom_out", false ) end end addEventHandler("onClientPlayerWeaponSwitch", localPlayer, sniperAutoZoom) For some reason "zoom_in" actually zoom out, and "zoom_out" zoom in for me, maybe my controls are wrong idk. This solution is not great cause the zoom is not instant and you can't zoom out if needed. You could maybe add a timer so it only zoom in for a little while and then allow players to zoom out if needed. Link to comment
RekZ Posted April 24, 2022 Author Share Posted April 24, 2022 (edited) Sorry @Spakye I didn't explain myself well, i want to edit the zoom of weapon like the M4 or MP5, the handgun and the MP5 have a small zoom comparate to the M4 or the AK. Edited April 24, 2022 by RekZ Link to comment
Spakye Posted April 25, 2022 Share Posted April 25, 2022 Ah my bad, sorry i dont know then. Maybe with flags as you said but none seems to match what you want 1 Link to comment
RekZ Posted April 25, 2022 Author Share Posted April 25, 2022 4 hours ago, Spakye said: Ah my bad, sorry i dont know then. Maybe with flags as you said but none seems to match what you want i found something that i think i can use jajaja, thanks for help anyway setCameraFieldOfView 1 Link to comment
Spakye Posted April 25, 2022 Share Posted April 25, 2022 Im afraid it won't work, it says : Note: setCameraFieldOfView does not affect the FOV for the following camera modes: 1) Player aiming 2) Vehicle front bumper camera 3) Fixed camera. I hope it will though! 1 Link to comment
RekZ Posted April 25, 2022 Author Share Posted April 25, 2022 (edited) 1 hour ago, Spakye said: Im afraid it won't work, it says : Note: setCameraFieldOfView does not affect the FOV for the following camera modes: 1) Player aiming 2) Vehicle front bumper camera 3) Fixed camera. I hope it will though! The M4 FOV is 50, with this function adjust the fov to 50 when the player aim, I can manually adjust the fov to 50 so that it loads faster than the GTA Default FOV, it's a bad implementation but for what I'm looking for it works for me xd Edited April 25, 2022 by RekZ 1 Link to comment
copo Posted June 11, 2022 Share Posted June 11, 2022 On 25/04/2022 at 08:34, Spakye said: Receio que não funcione, ele diz : Nota: setCameraFieldOfView não afeta o FOV para os seguintes modos de câmera: 1) Mira do jogador 2) Câmera do pára-choque dianteiro do veículo 3) Câmera fixa. Espero que sim! e ativar primeira pessoa pelo setWeaponProperty usando comando ? ativar e desativar ele com comando, tem como ? Link to comment
Moderators Vinyard Posted June 12, 2022 Moderators Share Posted June 12, 2022 7 hours ago, copo said: e ativar primeira pessoa pelo setWeaponProperty usando comando ? ativar e desativar ele com comando, tem como ? Hi, please use English around the forums! Link to comment
Mr.Hugin Posted June 12, 2022 Share Posted June 12, 2022 On 4/24/2022 at 2:36 AM, RekZ said: Hello, i'm looking for some way to fast the weapon zoom when i'm aiming. Maybe i can edit the flags using ? setWeaponProperty I do not understand what you want to adjust, can you clarify that, a solution that you mean to enlarge the zoom of the weapon or a picture of the extended camera Link to comment
copo Posted June 13, 2022 Share Posted June 13, 2022 20 hours ago, Mr.Hugin said: Eu não entendi o que você quer ajustar, você pode esclarecer isso, uma solução que você pretende aumentar o zoom da arma ou uma foto da câmera estendida I wanted to add a command to be able to activate and deactivate this script whenever the player wants, example: of /weapon and turn flag_aim_1st_person of /weapon again and turn off flag_aim_1st_person 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