🏚️Stash Houses
Inspired from the Stash House raids on GTA online, I spent 4-5 days doing my best to recreate it as close to online as possible with utilizing some more modern features that you see in FiveM today.
Client
If you do not wish to use the ped interact system as a way to get a location, you can set StartPed enable option to false in the sv_config.lua and call the client export below.
local success = exports.randol_stashhouses:GetLocation()
print(success) -- returns booleanPlayer states are set from server side and replicated to the client. You can use the LocalPlayer state on the client to implement into your dispatch shooting alert to stop it triggering when a player is inside a stash house.
if LocalPlayer.state.inStashHouse then
return -- Return and don't execute the rest of the code.
endServer
This is the server side player state example:
local src = source
if Player(src).state.inStashHouse then
print('Inside stash house')
endLast updated