Skip to content

Commit

Permalink
Small update (#117)
Browse files Browse the repository at this point in the history
* small update

added configurable option for max distance between horse and player,  the horse will be sent automatically

* Update fxmanifest.lua

- version bump

* Update package.json

- version bump

* Update version

- version bump

---------

Co-authored-by: Apollyon <37031311+JusCampin@users.noreply.github.com>
  • Loading branch information
iseeyoucopy and JusCampin authored Jul 7, 2024
1 parent 253c438 commit 8e96543
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
3 changes: 1 addition & 2 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -609,11 +609,10 @@ AddEventHandler('bcc-stables:HorsePrompts', function()
while MyHorse do
local playerPed = PlayerPedId()
local sleep = 1000
local maxDistance = 50.0 -- Set a maximum distance for the horse to be sent away
local distance = #(GetEntityCoords(playerPed) - GetEntityCoords(MyHorse))

-- Check if the player is getting away from the horse
if distance > maxDistance then
if distance > Config.maxDistanceFlee then
Wait(500)
FleeHorse()
Wait(500)
Expand Down
4 changes: 4 additions & 0 deletions config/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ Config.maxPlayerHorses = 5 -- Default: 5
Config.maxTrainerHorses = 10 -- Default: 10
-----------------------------------------------------

--Max distance between player and horse, if he move away from horse, it will send automatically
Config.maxDistanceFlee = 150
-----------------------------------------------------

-- Can Spawn Horse Anywhere with Whistle
Config.whistleSpawn = true -- Default:true / Set to false to only Use 'Call Horse' Button at Stable to Spawn Horse
-----------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ files {
"ui/img/*.*"
}

version '1.4.12'
version '1.4.13'

2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bcc-stables",

"version": "1.4.12",
"version": "1.4.13",

"private": true,
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<1.4.12>
Update horse looting.
<1.4.13>
See GitHub for details!

0 comments on commit 8e96543

Please sign in to comment.