Skip to content

Commit

Permalink
rename to y_alcoholism
Browse files Browse the repository at this point in the history
  • Loading branch information
TonybynMp4 committed May 11, 2024
1 parent 33d857f commit 4a64c26
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# qbx_alcoholism
# y_alcoholism
A resource that allows you to fall into alcoholism.
(it adds the effects of alcohol that's it)

## Instalation
- qbx_smallresources
- client/consumables.lua & server/consumables.lua remove the loop / callback related to alcohol
- config/shared.lua remove (or move them to this script, the config is compatible) the alcohol items
- config/shared.lua remove (or move them to this script, the config is compatible) the alcohol items

- Download -> put in resources/[whatever-you-want] -> ensure qbx_alcoholism -> Enjoy! (kinda weird to say that)
- Download -> put in resources/[whatever-you-want] -> ensure y_alcoholism -> Enjoy! (kinda weird to say that)

## Features
- Ability to get drunk
Expand Down
2 changes: 1 addition & 1 deletion client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ RegisterNetEvent('QBCore:Client:OnPlayerUnload', function()
end)

RegisterNetEvent('qbx_medical:client:playerRevived', function()
TriggerServerEvent('qbx_alcoholism:server:playerRevived')
TriggerServerEvent('y_alcoholism:server:playerRevived')
end)

AddEventHandler('onResourceStart', function(resource)
Expand Down
4 changes: 2 additions & 2 deletions fxmanifest.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
fx_version 'cerulean'
game 'gta5'

description 'qbx_alcoholism'
description 'y_alcoholism'
authors 'Tonybyn_Mp4'
repository 'https://github.com/TonybynMp4/qbx_alcoholism'
repository 'https://github.com/TonybynMp4/y_alcoholism'
version '1.1.1'

shared_scripts {
Expand Down
8 changes: 4 additions & 4 deletions server/main.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
lib.versionCheck('TonybynMp4/qbx_alcoholism')
lib.versionCheck('TonybynMp4/y_alcoholism')
local config = require 'config.server'
local sharedConfig = require 'config.shared'

Expand Down Expand Up @@ -53,7 +53,7 @@ AddEventHandler('txAdmin:events:healedPlayer', function(eventData)
local player = exports.qbx_core:GetPlayer(target)
if not player then return end
player.Functions.SetMetaData('alcohol', 0)

local playerState = Player(target).state
if not playerState then return end
return playerState:set('alcohol', 0, true)
Expand All @@ -63,15 +63,15 @@ AddEventHandler('txAdmin:events:healedPlayer', function(eventData)
local player = exports.qbx_core:GetPlayer(id)
if not player then goto continue end
player.Functions.SetMetaData('alcohol', 0)

local playerState = Player(id).state
if not playerState then goto continue end
playerState:set('alcohol', 0, true)
::continue::
end
end)

RegisterNetEvent('qbx_alcoholism:server:playerRevived', function()
RegisterNetEvent('y_alcoholism:server:playerRevived', function()
local player = exports.qbx_core:GetPlayer(source)
if not player then return end
player.Functions.SetMetaData('alcohol', 0)
Expand Down

0 comments on commit 4a64c26

Please sign in to comment.