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.
-- 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?
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.