Hello today I bring you a new script, in which you can buy a wide variety of fully interactive tobacco packages, the script contains the textures of the tobacco machines, I put them to save you all the time of looking for it, I hope you like it and do not forget to like the post
PD : You can add stress or thirst when the item is used…
quick question : can you walk and smoke at the same time, ? is there a way to cancel the animation… oops that was two questions hehe. thanks for the hard work. I think I need this in my life
Hello, thank you very much, you cannot smoke while you walk, basically because it is executing an animation from the normal animations menu, but if you can cancel while you smoke, if you raise your hands you can cancel the animation, or you can wait until it finishes, I will upload a new one more worked version in which you can cancel the animation at any time without raising your hands.
yes. i have it!!
Go in es_extended/server/paycheck.lua (comment the code fragment that you already have and paste this)
ESX.StartPayCheck = function()
function payCheck()
local xPlayers = ESX.GetPlayers()
for i=1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
local job = xPlayer.job.grade_name
local salary = xPlayer.job.grade_salary
if salary > 0 then
if job == 'unemployed' then -- unemployed
xPlayer.addAccountMoney('bank', salary)
TriggerClientEvent('mythic_notify:client:SendAlert', xPlayer.source, { type = 'sueldo', text = _U('received_help', salary) })
elseif Config.EnableSocietyPayouts then -- possibly a society
TriggerEvent('esx_society:getSociety', xPlayer.job.name, function (society)
if society ~= nil then -- verified society
TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function (account)
if account.money >= salary then -- does the society money to pay its employees?
xPlayer.addAccountMoney('bank', salary)
account.removeMoney(salary)
TriggerClientEvent('esx:showAdvancedNotification', xPlayer.source, _U('bank'), _U('received_paycheck'), _U('received_salary', salary), 'CHAR_BANK_MAZE', 9)
else
TriggerClientEvent('esx:showAdvancedNotification', xPlayer.source, _U('bank'), '', _U('company_nomoney'), 'CHAR_BANK_MAZE', 1)
end
end)
else -- not a society
xPlayer.addAccountMoney('bank', salary)
TriggerClientEvent('mythic_notify:client:SendAlert', xPlayer.source, { type = 'sueldo', text = _U('received_help', salary) })
end
end)
else -- generic job
xPlayer.addAccountMoney('bank', salary)
TriggerClientEvent('mythic_notify:client:SendAlert', xPlayer.source, { type = 'sueldo', text = _U('received_help', salary) })
end
end
end
SetTimeout(Config.PaycheckInterval, payCheck)
end
SetTimeout(Config.PaycheckInterval, payCheck)
end
do you know why ExecuteCommand(‘e smoke’) somehow do not work for me and smoking animation won’t start. Should I try TaskStartScenarioInPlace(playerPed, “WORLD_HUMAN_SMOKING”, 0, true) for that or I should add that command somewhere?
Maybe it’s because you don’t have the dpemotes, it usually happens since that command works when you have the dpemotes. You can try putting TaskStartScenarioInPlace (playerPed, “WORLD_HUMAN_SMOKING”, 0, true) in the place where it says ExecuteCommand (‘e smoke’)
ah yes, that makes sense. :)) I overlooked that there is a dependency and wasn’t sure where I can find this command. thanks.
– that would be the part to replace ExecuteCommand (‘e smoke’) line
Citizen.CreateThread(function()
TaskStartScenarioInPlace(ped, “WORLD_HUMAN_SMOKING”, 0, true)
end)