Buy phone

I’ve seen alot of servers use the script esx_phonestore, it makes you buy the phone instead of always having it, i would really appreciate if someone would do it. This script to be exact https://■■■■■■■■■■■■.net/viewtopic.php?f=10&t=341

Then i would like to see a iphone skin
https://gyazo.com/9c0e26883d16ec4073850213d51057dd

5 Likes

Do you want an iphone X phone?

2 Likes

Ps. Are you swedish?

3 Likes

I have the iphone x phone i want the esx_phonestore

1 Like

I have the iPhone X, I love it. Great phone - worth the money for sure.

1 Like

What do you mean with worth the money?

1 Like

Hope this helps

Does it work on VRP?

have you found a way?

1 Like

If you want to buy a phone, go to your local cellular phone retailer and purchase one.

1 Like

funny!!! i was just asking

1 Like

You can accomplish this in just two steps:
1- Put the phone in the DataBase as an item.
2- In the resource of the mobile phone check when the player press the key to open the mobile phone and check in the DataBase if it has this ITEM.

Hope this helps

This is the example I sent up.

if IsControlJustReleased(0, Keys['F1']) then
				ESX.TriggerServerCallback('esx_phone:getItemAmount', function(qtty)
					if not ESX.UI.Menu.IsOpen('phone', GetCurrentResourceName(), 'main') and qtty > 0 then
						ESX.UI.Menu.CloseAll()
						ESX.UI.Menu.Open('phone', GetCurrentResourceName(), 'main')
					else
						ESX.ShowNotification("Vous n'avez pas de téléphone.")
					end
				end, 'phone')
			end
ESX.RegisterServerCallback('esx_phone:getItemAmount', function(source, cb, item)
    local xPlayer = ESX.GetPlayerFromId(source)
    local qtty = xPlayer.getInventoryItem(item).count
	print("phone qtty: " .. qtty)
    cb(qtty)
end)

Remember, this is just an example, and it will only work with ESX, but you can adapt to anything else!

5 Likes

so i could do the same with esx_phone3 aswell?

yes the example work for that phone!

tyvm have a nice day

1 Like

where do i put the code cant get it to work

When I don’t have the phone i still do receive the text messages any way to disable that to?

Do it before every message is received

So how can I create the ability, that someone can check if the target has the phone.
The blocade of receiving messages destroy changes such as the billing. I also would like to add the information that the contact is out of range.

For the call

RegisterNetEvent('esx_phone:incomingCall')
AddEventHandler('esx_phone:incomingCall', function(target, channel, number)
  ESX.TriggerServerCallback('esx_phone:getItemAmount', function(qtty)
    if qtty > 0 then
      if not OnCall then

        ESX.UI.Menu.Open('phone', GetCurrentResourceName(), 'main')

        SendNUIMessage({
          incomingCall = true,
          target       = target,
          channel      = channel,
          number       = number,
        })

      end
    end
  end, 'phone')
end)

@JaroSound Make the same for the message event

This event:

RegisterNetEvent('esx_phone:onMessage')
AddEventHandler('esx_phone:onMessage', function(phoneNumber, message, position, anon, job, dispatchRequestId, idnum)

Wat?