Skip to content

Commit

Permalink
#update supv_core v0.7.4.1b
Browse files Browse the repository at this point in the history
- Correction
  - Module
     - player (seat lost self.pedid)
  • Loading branch information
SUP2Ak committed Feb 12, 2023
1 parent ac39338 commit 99d968e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ game 'gta5'
lua54 'yes'

author 'SUP2Ak'
version '0.7.4'
version '0.7.4.1'
link 'https://github.com/SUP2Ak/supv_core'

description 'a core standalone to manage your server and got useful function to develop it too'
Expand Down
7 changes: 4 additions & 3 deletions imports/player/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@ end
---@param target nil|boolean
---@return entity|false
local function getCurrentVehicle(self)
self.currentvehicle = GetVehiclePedIsIn(PlayerPedId(), false)
if self.currentvehicle > 0 then
self.currentvehicle = GetVehiclePedIsIn(PlayerPedId(), false) > 0 and GetVehiclePedIsIn(PlayerPedId(), false) or false
if self.currentvehicle then
return self.currentvehicle
end
self.seat = nil
return false
end

local function getSeat(self)
if not self.pedid or self.pedid ~= PlayerPedId() then self.pedid = PlayerPedId() end -- évite la perte du pedid au premier chargement, sera corrigé mieux que cela dans la release de supv_core (hors beta)
if self.currentvehicle then
if self.seat and self.pedid == GetPedInVehicleSeat(self.currentvehicle, self.seat) then return self.seat end
local model = GetEntityModel(self.currentvehicle)
Expand Down Expand Up @@ -65,7 +66,7 @@ local function getPlayer(target)
self.playerid = PlayerId()
self.serverid = GetPlayerServerId(self.playerid)
self.screen = GetActiveScreenResolution()
self.currentvehicle = GetVehiclePedIsIn(self.pedid)
self.currentvehicle = GetVehiclePedIsIn(self.pedid) > 0 and GetVehiclePedIsIn(self.pedid) or false
self.coords = GetEntityCoords(self.pedid)
self.dist = nil
self.seat = nil
Expand Down
1 change: 1 addition & 0 deletions resources/server/version.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

local tr <const>, cfg <const> = Config.SelectedLanguage, Config
local message <const> = cfg.Translate[tr].version

Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"script": "supv_core",
"version": "0.7.4",
"version": "0.7.4.1",
"link": "https://github.com/SUP2Ak/supv_core"
}

0 comments on commit 99d968e

Please sign in to comment.