Could someone convert this to a FiveM script?
SetNightvision(true) -- Enables the night vision (What else?)
SetSeethrough(true) -- Enables the thermal vision.
Yeah but a toggle function when aiming with a sniper
IsPlayerFreeAiming(PlayerId()) -- Returns true if the player is aiming
--100416529 Hash of sniper rifle
--205991906 Hash of heavy sniper
GetCurrentPedWeapon(PlayerPedId(),hash,1) --Returns true if the hash match with the player's weapon.
You already have the necessary to build your own function.
Give a man a fish, and you feed him for a day. Teach a man to fish, and you feed him for a lifetime.
but am noob - pls help senpai
@Guybru5h gave you everything you need to build a simple resource to do as you wish. Read the documentation and at least attempt it. If you have issues, post what you tried and what itβs doing. This should be like a 5 line script and is very basic.
I know this is like 2/3 years old, but can you send the 5 line script coz im a noob and im not planning to learn coding anytime soon.
I hope this somehow helps
thermalVisionSniperRifle.rar (793 Bytes)
ensure thermalVisionSniperRifle
Add to server.cfg
In the config change to hash what sniper rifle you want to apply to
You mean the source code or ? The resource is up in the thread
These scripts are for the serversβ¦
@IngPleb It wonβt seem to work, i cant toggle it on βvβ and ive done as you said