[Release] VIP Status [ESX]

It say that in the console when a player die and has the vip status, it just give it back to refresh his characters to still have access to everything. Do no worry.

You have to use the callback in the function where you press [E] to open the menu, not directly into the OpenShopMenu.

Oh thanx !
And for the message in the console, it’s a verry big spam :c

Oh i understand how work ahah ok sorry thx for the help ! :smiley:

It shouldn’t spam and wrote it 1 times, strange. I do not have this problem.

Can someone help me make this garage accessable only for players who have VIP?

In the function where you have to press E (for exemple) to open the garage, use the callback

Its easier to say, I have already tried it but see the client file. Its confusing or I am just dumb.

How can I do it on esx_vehicleshop?

just follow the exemple in the in 3rd post… it’s easy to use the callback in the function where you have to press E to open the menu.

I can’t find that function, can you tell me how is it called? Thanks!

1 Like
-- Key controls
Citizen.CreateThread(function()
	while true do
		Citizen.Wait(10)

		if CurrentAction == nil then
			Citizen.Wait(500)
		else
			ESX.ShowHelpNotification(CurrentActionMsg)

			if IsControlJustReleased(0, Keys['E']) then
				if CurrentAction == 'shop_menu' then
					ESX.TriggerServerCallback('pxrp_vip:getVIPStatus', function(isVIP)
						if isVIP then
							OpenShopMenu()
						else
							ESX.ShowNotification("Vous devez être VIP pour accedez à ce magasin")
						end
					end, GetPlayerServerId(PlayerId()), '1')
				elseif CurrentAction == 'boss_actions_menu' then
					OpenBossActionsMenu()
				end

				CurrentAction = nil
			end
		end
	end
end)

Thanks bro, is working but it doesn’t display any notification when player isn’t vip. And one more question how can I make somebody VIP? Without chaning 0 to 1 in SQL?

The notification is here :
ESX.ShowNotification(“Vous devez être VIP pour accedez à ce magasin”)

and there is a command to make somebody vip when they are ingame.

is there a way to have it so instead of cloning the vehicleshop to just add vip to the vehicle category and set one category to vip?

He answer that questions almost 4 times, read the 3° post

That’s for setting a price I want to show a category for them and them only

1 Like

Works a little the same way just have it open a different menu if they are vip that displays the categories. So like if vip then OpenVIPBuyMenu else OpenBuyMenu or something similar. Then exclude the categories from the other menu.

Should work like that I believe. Haven’t actually tested myself but looking at a couple posts in here that seems how it should work. Currently on mobile otherwise would have a bit more detail.

How do I use it in the store of esx_inventoryhud :sob:

And esx_advancedgarage’s drag payment function :crazy_face:

Can anyone guide me :sob:

Can someone make the Command for the new ESX?


TriggerEvent('es:addGroupCommand', 'addvip', 'superadmin', function(source, args, user)
	if args[1] ~= nil then
		if GetPlayerName(tonumber(args[1])) ~= nil then
			print(('pxrp_vip: %s added someone to vip'):format(GetPlayerIdentifiers(source)[1]))
			TriggerClientEvent('chat:addMessage', -1, {
			template = '<div style="padding: 0.5vw; margin: 0.5vw; background-color: rgba(158, 35, 35, 0.4); border-radius: 3px;"><i class="fas fa-globe"></i> <b>[Nieuwstad] '..GetPlayerName(tonumber(args[1]))..'</b> <i>is toegevoegd als VIP bewoner</i></div>'
			})			
			TriggerClientEvent('pxrp_vip:addVIPStatus', tonumber(args[1]))
		end
	else
		TriggerClientEvent('pxrp_vip:addVIPStatus', source)
	end
end, function(source, args, user)
	TriggerClientEvent('chat:addMessage', source, { args = { '^1SYSTEM', 'Insufficient Permissions.' } })
end, { help = "Geef de VIP status aan een speler", params = {{ name = 'steamid' }} })

Does not work anymore

Hi, anyone have idea how to use this script with kashacter for 2nd Character? I have really no idea how to make this callback

1 Like