Skip to content
This repository has been archived by the owner on Apr 21, 2024. It is now read-only.

Commit

Permalink
bump: version 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
SUP2Ak committed Nov 28, 2023
1 parent 2afd594 commit 9259e14
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 73 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# sublime_administration
# TELECHARGEZ LA RESSOURCE ICI : https://github.com/SUP2Ak/sublime_administration

- __dependency__ : ``es_extended LEGACY``

Expand Down Expand Up @@ -58,4 +57,4 @@ exemple :
(utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT)
```

Veuillez bien mettre tout les collations identitque dans votre base de donnée, car ce script contient des requêtes sql "innerjoin"
Veuillez bien mettre tout les collations identitque dans votre base de donnée, car ce script contient des requêtes sql "innerjoin"
19 changes: 19 additions & 0 deletions client/fonction's/[d]NoClip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,25 @@ function _Admin.NoClip()
DisableAllControlActions()
EnableControlAction(0, 1, true)
EnableControlAction(0, 2, true)
EnableControlAction(0, 176, true)
EnableControlAction(0, 69, true)
EnableControlAction(0, 92, true)
EnableControlAction(0, 106, true)
EnableControlAction(0, 122, true)
EnableControlAction(0, 135, true)
EnableControlAction(0, 142, true)
EnableControlAction(0, 144, true)
EnableControlAction(0, 223, true)
EnableControlAction(0, 229, true)
EnableControlAction(0, 237, true)
EnableControlAction(0, 257, true)
EnableControlAction(0, 329, true)
EnableControlAction(0, 346, true)
EnableControlAction(0, 156, true)
EnableControlAction(0, 191, true)
EnableControlAction(0, 201, true)
EnableControlAction(0, 215, true)
EnableControlAction(0, 23, true)
EnableControlAction(0, 200, true) --> echap

local yoff = 0.0
Expand Down
8 changes: 8 additions & 0 deletions client/menu's/[b]OnlinePlayers/[b]PlayerDetails.lua
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,14 @@ function _Admin.Panel:PlayerDetailsVehicle2(rank, plate, stored, data, label, na
});
end
RageUI.Line()
RageUI.Button('Give Key', nil, {RightBadge = RageUI.BadgeStyle.Tick}, true, {
onSelected = function()
--TriggerServerEvent(_Admin.Prefix.."owned_vehicles", 3, plate, _Admin.TargetId, label, name, nil, nil, price)
--TriggerServerEvent('supv_carkey:registerKeyFromVehicle', plate, GetDisplayNameFromVehicleModel(data.model), _Admin.TargetId)
exports.supv_carkey:GiveCarKeyStrict(plate, GetDisplayNameFromVehicleModel(data.model), _Admin.TargetId)
Wait(200)
end
});
RageUI.Button('Transferez le véhicule', '~r~ATTENTION! ~y~Vous allez changez le propriétaire du véhicule!', {RightBadge = RageUI.BadgeStyle.Alert}, true, {}, _Admin.Menu.sub_allPlayers555);
RageUI.Button('Vendre le véhicule', '~r~ATTENTION! ~y~Vous allez supprimez le véhicule en base de donnée!\n~g~Le joueur sera remboursé.', {RightBadge = RageUI.BadgeStyle.Alert}, true, {
onSelected = function()
Expand Down
4 changes: 2 additions & 2 deletions fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fx_version 'cerulean'
game 'gta5'
lua54 'yes'
use_experimental_fxv2_oal 'yes'
version '1.6.1'
version '1.7'


client_scripts {
Expand Down Expand Up @@ -46,7 +46,7 @@ files {


dependencies {
'mysql-async', -- or oxmysql
'oxmysql', -- or oxmysql
'es_extended',
'skinchanger',
'esx_skin',
Expand Down
25 changes: 6 additions & 19 deletions server/[b]checkPermissions.lua
Original file line number Diff line number Diff line change
@@ -1,27 +1,16 @@
ESX.RegisterServerCallback(_Admin.Prefix.."OwnerPermissions", function(source, cb, type)
local xPlayer = ESX.GetPlayerFromId(source)
local found = false
for _,v in ipairs(_Admin.MainUser) do
if v == xPlayer.identifier then
found = true
end
end
if found then
cb(true)
else
cb(false)
if xPlayer then
if _Admin.MainUser[xPlayer.identifier] then cb(true) end
end
cb(false)
end)


function _Admin.CheckOwnerPermissions(xPlayer)
for _,v in ipairs(_Admin.MainUser) do
if v == xPlayer.identifier then
return true
else
return false
end
if xPlayer then
if _Admin.MainUser[xPlayer.identifier] then return true end
end
return false end
end


Expand All @@ -34,8 +23,6 @@ ESX.RegisterServerCallback(_Admin.Prefix.."CheckStaffPermissions", function(sour
end)




function _Admin.CheckStaffPermissions(xPlayer)
local _result = {bool = nil, name = nil; grade = nil}
if _Admin.SQLWrapperType == 1 then
Expand Down
65 changes: 21 additions & 44 deletions server/version.lua
Original file line number Diff line number Diff line change
@@ -1,46 +1,23 @@
-------------------------------------------------------------------------------------------
--------------------------------VERSION CHECK----------------------------------------------
-------------------------------------------------------------------------------------------
-- Ne pas toucher! / Don't touch it!
local HTTPrequest <const> = "https://raw.githubusercontent.com/SUBLiME-Association/sublime_administration-fivem-esxLegacy/version.json"

local HTTPrequest = "https://raw.githubusercontent.com/SUBLiME-Association/sublime_administration-fivem-esxLegacy/main/version.json"
Citizen.CreateThread(function()
local Version, _v = LoadResourceFile(GetCurrentResourceName(), 'version.json')
if Version then _v = json.decode(Version) else return print("[^1ERROR^0] Impossible de vérifier la version car le fichier n'existe pas!") end
if json.encode(_v.enable) == "true" then
PerformHttpRequest(HTTPrequest, function(code, res, headers)
if code == 200 then
local _gv = json.decode(res)
if _gv.script == _v.script then
if _gv.version ~= _v.version then
print((
[[
^6----------------------------------------------------------------------
^4INFORMATION: ^2Veuillez mettre à jour %s!
^4VERSION: ^2La version %s est disponible!
^4CHANGELOG:^2 %s
^4DOWNLOAD:^2 %s
^6-----------------------------------------------------------------------
]]):format(_gv.script,_gv.version,_gv.changelog,_gv.link))
end
else
print((
[[
^6----------------------------------------------------------------------
^4INFORMATION: ^2Veuillez mettre à jour %s!
^4VERSION: ^2La version %s est disponible!
^4CHANGELOG:^2 %s
^4DOWNLOAD:^2 %s
^6-----------------------------------------------------------------------
]]):format(_gv.script,_gv.version,_gv.changelog,_gv.link))
end
else
print(('[^6%s^0] [^1ERROR^0] Impossible de vérifier la version!'):format(tostring(_v.script)))
end
end, 'GET')
end
end)
CreateThread(function()
local file, _v = LoadResourceFile(GetCurrentResourceName(), 'version.json')

if file then _v = json.decode(file) else return print("[^1ERROR^0] Impossible de vérifier la version car le fichier n'existe pas!") end

-------------------------------------------------------------------------------------------
--------------------------------VERSION CHECK----------------------------------------------
-------------------------------------------------------------------------------------------
local message <const> = "^3Veuillez mettre à jour la ressource %s\n^3votre version : ^1%s ^7->^3 nouvelle version : ^2%s\n^3liens : ^4%s"
local link <const> = "https://github.com/SUP2Ak/sublime_administration/tree/fellow-template-legacy"

PerformHttpRequest(HTTPrequest, function(code, res, headers)
if code == 200 then
local _gv = json.decode(res)
if _v.version == _gv.version then return end
print('^9---------------------------------------------------------')
print(message:format(_gv.script, _v.version, _gv.version, link))
print('^9---------------------------------------------------------')
else
return print("[^1ERROR^0] Impossible de vérifier la version code erreur github!")
end
end, 'GET')

end)
6 changes: 4 additions & 2 deletions shared/[a]Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ _Admin.Panel = _Admin.Panel or {}
--| ESX Legacy Version & RageUI Library

_Admin.MainUser = {
"3ec9bce5eb7535d3878b70bc3aad0d48fb307b18", -- "license", ou ce que vous retourne xPlayer.identifier si vous avez modifié es_extended pour que la fonction vous retourne le steamID par exemple
["3ec9bce5eb7535d3878b70bc3aad0d48fb307b18"] = true, -- "license", ou ce que vous retourne xPlayer.identifier si vous avez modifié es_extended pour que la fonction vous retourne le steamID par exemple
["3ec9bce5eb7535d3878b70bc3qsdqsdqsd21651sz"] = true, --...
["char1:3ec9bce5eb7535d3878b70bc3qsdqsdqsd21651sz"] = true, -- si multichar
}


Expand All @@ -31,7 +33,7 @@ _Admin.Config = {
--
TypeMoney = '$',
--
DoubleJob = false, -- false ou 'fbase' (fbase = doublejob qui passe sur la meme fonction ESX.DoesJobExist)
DoubleJob = false, -- false ou 'fbase' (fbase = doublejob qui passe sur la meme fonction ESX.DoesJobExist) (true == https://sup2ak.gitbook.io/documentation/esx-legacy)
--
SQL_Wrapper = "oxmysql", --> mysql or oxmysql -- IMPORTANT (change in fxmanifest your dependencies)
--
Expand Down
5 changes: 1 addition & 4 deletions version.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"enable": true,
"script": "sublime_administration",
"version": "0.0.0",
"changelog": "^2\n\t- ^3Re télécharger la ressource sur le github de SUP2Ak si vous êtes sur la template de fellow allez dans release et prenez la version 1.7f sinon prenez 1.7",
"link": "https://github.com/SUP2Ak/sublime_administration"
"version": "1.7"
}

0 comments on commit 9259e14

Please sign in to comment.