-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update wagons.lua - updated to remove vehicle propsets - credit to Kad * Update fxmanifest.lua - update fx version - add version check file path - version bump * Update README.md - add bcc-utils dependency for version check * Create versioncheck.lua * Create version
- Loading branch information
Showing
5 changed files
with
46 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,40 @@ | ||
if Config.Wagons.active then | ||
Citizen.CreateThread(function() | ||
local vehiclePool = {} | ||
local wagon = 0 | ||
local driver = 0 | ||
local horse = 0 | ||
while true do | ||
vehiclePool = GetGamePool('CVehicle') -- Get the list of vehicles (entities) from the pool | ||
for i = 1, #vehiclePool do -- loop through each vehicle (entity) | ||
wagon = vehiclePool[i] | ||
-- Is wagon stopped | ||
if IsEntityAVehicle(wagon) and IsVehicleStopped(wagon) then | ||
-- Get the horse | ||
horse = Citizen.InvokeNative(0xA8BA0BAE0173457B,wagon,0) | ||
-- If vehicle stopped but the horse walks = buggy wagon | ||
if IsPedWalking(horse) then | ||
if not IsEntityAMissionEntity(wagon) then --if the wagon is not a mission entity. Peds spawned naturally by game return false, peds created by script return true by default preventing this from deleting entities intentionally spawned by scripts | ||
-- Delete driver & wagon | ||
driver = Citizen.InvokeNative(0x2963B5C1637E8A27,wagon) | ||
if driver ~= PlayerPedId() then -- Ensure the driver is not a player | ||
if driver then | ||
DeleteEntity(driver) -- Delete driver from wagon if there is one | ||
end | ||
DeleteEntity(wagon) -- Delete buggy wagon | ||
end | ||
local function RemoveVehicleLightPropSets(...) | ||
return Citizen.InvokeNative(0xE31C0CB1C3186D40, ...) | ||
end | ||
|
||
local function RemoveVehiclePropSets(...) | ||
return Citizen.InvokeNative(0x3BCF32FF37EA9F1D, ...) | ||
end | ||
|
||
Citizen.CreateThread(function() | ||
local vehiclePool = {} | ||
local wagon = 0 | ||
local driver = 0 | ||
local horse = 0 | ||
while true do | ||
vehiclePool = GetGamePool('CVehicle') -- Get the list of vehicles (entities) from the pool | ||
for i = 1, #vehiclePool do -- loop through each vehicle (entity) | ||
wagon = vehiclePool[i] | ||
-- Is wagon stopped | ||
if IsEntityAVehicle(wagon) and IsVehicleStopped(wagon) and not IsEntityAMissionEntity(wagon) then | ||
-- Get the horse | ||
horse = Citizen.InvokeNative(0xA8BA0BAE0173457B, wagon, 0) | ||
-- If vehicle stopped but the horse walks = buggy wagon | ||
if IsPedWalking(horse) then | ||
-- Delete driver & wagon | ||
driver = Citizen.InvokeNative(0x2963B5C1637E8A27, wagon) | ||
if driver ~= PlayerPedId() then | ||
if driver then | ||
DeleteEntity(driver) | ||
end | ||
RemoveVehicleLightPropSets(wagon) | ||
RemoveVehiclePropSets(wagon) | ||
DeleteEntity(wagon) | ||
print('Delete buggy wagon') | ||
end | ||
end | ||
end | ||
Citizen.Wait(1000) | ||
end | ||
end) | ||
end | ||
Citizen.Wait(1000) | ||
end | ||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
BccUtils = exports['bcc-utils'].initiate() | ||
BccUtils.Versioner.checkFile(GetCurrentResourceName(), 'https://github.com/BryceCanyonCounty/bcc-vehiclefixes') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<1.0.1> | ||
See GitHub for details! |