LudiYoutuber65 Posted September 1, 2023 Share Posted September 1, 2023 (edited) How can I make my phone open via item, that is, it needs an item to open? Edited September 2, 2023 by Vinyard adding a better suited title Link to comment
5150 Posted September 4, 2023 Share Posted September 4, 2023 Are you asking how to create a dependency in order to open your phone? You'd use an if/then statement to specify the requirement before the code to activate the phone. As an example with the owl code here, you can see you require "itemValue" to be able to activate the phone. You can simply add any check you want within that if/then statement and it will require that check before opening. If you're using owl code, you can use "exports.global:hasItem(...)" to check if the player has what you're looking for Spoiler if itemValue then triggerClientEvent(thePlayer, "phone:slidePhoneIn", thePlayer, itemValue, nil, phoneNumber) --triggerEvent("phone:startDialing", thePlayer, phoneNumber, itemValue ) else outputChatBox("You don't have a phone.", thePlayer, 255, 0, 0) end Link to comment
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