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

Commit

Permalink
Update v8.7.1
Browse files Browse the repository at this point in the history
* Added Event for my WeaponFix Snippet
  • Loading branch information
Musiker15 committed Aug 30, 2023
1 parent 9cf5967 commit 30dd244
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ games { 'gta5' }
author 'Musiker15 - MSK Scripts'
name 'msk_weaponammo'
description 'Ammunition, Components & Tints'
version '8.7'
version '8.7.1'

lua54 'yes'

Expand Down
13 changes: 13 additions & 0 deletions server/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,16 @@ GithubUpdater = function()
GetCurrentVersion = function()
return GetResourceMetadata(GetCurrentResourceName(), "version")
end

isVersionIncluded = function(Versions, cVersion)
for k, v in pairs(Versions) do
if v.version == cVersion then
return true
end
end

return false
end

local CurrentVersion = GetCurrentVersion()
local resourceName = "^0[^2"..GetCurrentResourceName().."^0]"
Expand All @@ -273,6 +283,9 @@ GithubUpdater = function()
for i=1, #decoded do
if decoded[i]['version'] == CurrentVersion then
break
elseif not isVersionIncluded(decoded, CurrentVersion) then
print('^1You are using the ^3BETA VERSION^1 of ^0' .. resourceName)
break
end

if decoded[i]['changelogs'] then
Expand Down

0 comments on commit 30dd244

Please sign in to comment.