Jump to content

[Help] open phone interface via item


LudiYoutuber65

Recommended Posts

  • Vinyard changed the title to [Help] open phone interface via item

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...