Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Drugs effects (coke-weed) and usable items #18

Closed
wants to merge 7 commits into from

Conversation

Manta95
Copy link

@Manta95 Manta95 commented Aug 24, 2023

No description provided.

Added coke and weed effect + level + animations
Removed unnecessary notifications and set run speed
Copy link
Contributor

@Gellipapa Gellipapa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please read my comment and fixes

client/main.lua Outdated
end)

Citizen.CreateThread(function()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove Citizen prefix

client/main.lua Outdated

Citizen.CreateThread(function()
while true do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why needed infinity loop?

client/main.lua Outdated
--When effects ends go back to normal
function Normal()
Citizen.CreateThread(function()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove prefix

client/main.lua Outdated
--In case too much drugs dies of overdose set everything back
function overdose()
Citizen.CreateThread(function()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove prefix

client/main.lua Outdated
RequestAnimSet("move_m@hurry_butch@b")
while not HasAnimSetLoaded("move_m@hurry_butch@b") do
Citizen.Wait(0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove prefix

client/main.lua Outdated
RequestAnimSet("move_m@hipster@a")
while not HasAnimSetLoaded("move_m@hipster@a") do
Citizen.Wait(0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove prefix

client/main.lua Outdated

TaskStartScenarioInPlace(playerPed, "WORLD_HUMAN_SMOKING_POT", 0, 1)
Citizen.Wait(3000)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove prefix

client/main.lua Outdated
SetRunSprintMultiplierForPlayer(player, 0.7)

Wait(300000)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this? 300000?

client/main.lua Outdated
TaskPlayAnim(playerPed, lib, anim, 8.0, -8.0, -1, 32, 0, false, false, false)

Citizen.Wait(500)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove prefix

client/main.lua Outdated
Comment on lines 180 to 184

if IsAlreadyDrug then
start = false
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local start = not IsAlreadyDrug ?

Copy link
Contributor

@Gellipapa Gellipapa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fixes this problems.

AddEventHandler('esx_status:loaded', function(status)
TriggerEvent('esx_status:registerStatus', 'drug', 0, '#9ec617',
function(status)
if status.val > 0 then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return status.val > 0


end)
local level = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is local variable all time 0, you don't set any other value in code.

Wait(0)
end
onDrugs = true
count = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why global variable? You should change to local count.

SetPedMovementClipset(playerPed, "move_m@hipster@a", true)

--Effects
local player = PlayerId()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line move to 252 row please.

@Gellipapa
Copy link
Contributor

Hi! @Manta95 Can you fix issues?

@Gellipapa Gellipapa closed this Sep 4, 2023
@Gellipapa Gellipapa reopened this Sep 4, 2023
@Gellipapa
Copy link
Contributor

Hi! I can't wait any longer sorry I'm closing due to inactivity.

@Gellipapa Gellipapa closed this Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants