Skip to content

Commit

Permalink
update freeroam
Browse files Browse the repository at this point in the history
  • Loading branch information
Shady1 committed Nov 22, 2024
1 parent 4a18d75 commit ad7229a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions [gameplay]/freeroam/fr_server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ g_RPCFunctions = {
setPedAnimation = { option = 'anim', descr = 'Setting an animation' },
setPedFightingStyle = { option = 'setstyle', descr = 'Setting fighting style' },
setPedGravity = { option = 'gravity.enabled', descr = 'Setting gravity' },
setPedWalkingStyle = { option = 'walkstyle', descr = 'Setting walking style' },
setPedStat = { option = 'stats', descr = 'Changing stats' },
setPedWearingJetpack = { option = 'jetpack', descr = 'Adding/removing a jetpack' },
setVehicleColor = true,
Expand Down Expand Up @@ -74,6 +75,7 @@ g_OptionDefaults = {
setstyle = true,
spawnmaponstart = true,
spawnmapondeath = true,
walkstyle= true,
stats = true,
upgrades = true,
warp = true,
Expand Down Expand Up @@ -471,6 +473,7 @@ addEventHandler('onPlayerChat', root,
end
)


addEventHandler('onVehicleEnter', root,
function(player, seat)
if not g_VehicleData[source] then
Expand Down
2 changes: 2 additions & 0 deletions [gameplay]/freeroam/meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<config src="data/animations.xml" type="client" />
<config src="data/interiors.xml" type="client" />
<config src="data/skins.xml" type="client" />
<config src="data/walk.xml" type="client" />
<config src="data/stats.xml" type="client" />
<config src="data/vehicles.xml" type="client" />
<config src="data/weapons.xml" type="client" />
Expand Down Expand Up @@ -79,6 +80,7 @@
<setting name="*setskin" value="true" />
<setting name="*setstyle" value="true" />
<setting name="*stats" value="true" />
<setting name="*walks" value="true" />
<setting name="*upgrades" value="true" />
<setting name="*warp" value="true" />
<setting name="*weapons/enabled" value="true" /> <!-- Can players give themselves weapons? -->
Expand Down
7 changes: 7 additions & 0 deletions [gameplay]/freeroam/remote_player_call_validation_server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ g_RPCFunctionsValidation = {
if (#{ ... } > 0) then return false end
return true
end,
setPedWalkingStyle = function(thePlayer, styleId, ...)
if client ~= thePlayer then return false end
if type(styleId) ~= "number" then return false end
if (#{ ... } > 0) then return false end
return true
end,

setPedWearingJetpack = function(thePlayer, toggle, ...)
if client ~= thePlayer then return false end
if type(toggle) ~= "boolean" then return false end
Expand Down

0 comments on commit ad7229a

Please sign in to comment.