LONIX Posted May 31, 2023 Share Posted May 31, 2023 (edited) Hello everybody, i'm trying to make a mod but still too noob to do that alone.... please help me ^^ !!! This mod essentially remap some key to do specific actions. The action i'm focus in is the smoke action. What i want to do is a function that check if player have all the items needed to smoke a cigarette (cigarette lighter or matches) and then perform eatItem(cigarettes, 1, 0). Would be great if the used items return back on their original containers after the action. Thanks in advance Edited May 31, 2023 by LONIX Link to comment Share on other sites More sharing options...
azrathud Posted June 8, 2023 Share Posted June 8, 2023 (edited) locate cigarrette: local cigarette = getPlayer():getInventory():getFirstTypeRecurse("Base.Cigarettes") if not cigarette then return end ... My recommendation is to look at AutoSmoke mod files for part of what you need You can find the mod files within the steam app by subscribing to the mod for example go to C:\Program Files (x86)\Steam\steamapps\workshop\content\ And then searching for the modname with the searchbar ("AutoSmoke") https://steamcommunity.com/sharedfiles/filedetails/?id=264375187 Edited June 8, 2023 by azrathud Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now