-
Notifications
You must be signed in to change notification settings - Fork 21
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
Conversation
Added coke and weed effect + level + animations
Removed unnecessary notifications and set run speed
There was a problem hiding this 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() |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
|
||
if IsAlreadyDrug then | ||
start = false | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local start = not IsAlreadyDrug ?
There was a problem hiding this 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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.
Hi! @Manta95 Can you fix issues? |
Hi! I can't wait any longer sorry I'm closing due to inactivity. |
No description provided.