gamz-food

Instead of carrying around lots of food you go to a place and order food there.
Very simple to configure.

Configurable things

  • Locations
  • Food & drinks
  • Props
  • Prices
  • Eating animations

Links
Preview Video
Github

8 Likes

Nice, but isnt this already released?

1 Like

As I mentioned I don’t know if there is anything like this released. However I’ve seen similar scripts but not released.

Nice release!

1 Like

Good job on this!

1 Like

noicee

1 Like

very nice good job

1 Like

gamz good, good gamz, gomz gaad

1 Like

How do I convert this to vRP?

vRP

local items = {}

local function play_eat(player)
  local seq = {
    {"mp_player_inteat@burger", "mp_player_int_eat_burger_enter",1},
    {"mp_player_inteat@burger", "mp_player_int_eat_burger",1},
    {"mp_player_inteat@burger", "mp_player_int_eat_burger_fp",1},
    {"mp_player_inteat@burger", "mp_player_int_eat_exit_burger",1}
  }

  vRPclient.playAnim(player,{true,seq,false})
end

local function play_drink(player)
  local seq = {
    {"mp_player_intdrink","intro_bottle",1},
    {"mp_player_intdrink","loop_bottle",1},
    {"mp_player_intdrink","outro_bottle",1}
  }

  vRPclient.playAnim(player,{true,seq,false})
end

local function gen(ftype, vary_hunger, vary_thirst)
  local fgen = function(args)
    local idname = args[1]
    local choices = {}
    local act = "Unknown"
    if ftype == "eat" then act = "Comer" elseif ftype == "drink" then act = "Beber" end
    local name = vRP.getItemName(idname)

    choices[act] = {function(player,choice)
      local user_id = vRP.getUserId(player)
      if user_id ~= nil then
        if vRP.tryGetInventoryItem(user_id,idname,1,false) then
          if vary_hunger ~= 0 then vRP.varyHunger(user_id,vary_hunger) end
          if vary_thirst ~= 0 then vRP.varyThirst(user_id,vary_thirst) end

          if ftype == "drink" then
			TriggerClientEvent('chatMessage', player, '', {255, 0, 0}, "Bebendo "..name..".", {18,177,255, 0.5})
            play_drink(player)
          elseif ftype == "eat" then
			TriggerClientEvent('chatMessage', player, '', {255, 0, 0}, "Comendo "..name..".", {255,165,0, 0.5})
            play_eat(player)
          end

          vRP.closeMenu(player)
        end
      end
    end}

    return choices
  end

  return fgen
end

Remade the script, much easier to config now with even more options.

Cool. I didn’t notice there was an update ill download it now.

Could someone convert to VRP? it would be nice to have this script for both frameworks

VRP is dead. Please stop using that.

VRP is not dead

Please… VRP is both bad and dead. No1 should use it. ESX, standalone or own framework is the way to go. I would rather play on a server without a framework than playing on a VRP server because it is so bad.

1 Like

I do not develop for VRP so I don’t make scripts for it. And as @LifeGoal said, its dead.

bro how do i add more coords

Config.Zones = {

    ["Chihuahua Hotdogs"] = {

        ["coords"] = vector3(43.775257110596, -997.98028564453, 29.336441040039),

        ["drink"] = {
            ["Coca Cola"] = {
                ["price"] = 20,
                ["prop"] = "prop_ecola_can"
            },

            ["Sparkling Water"] = {
                ["price"] = 15,
                ["prop"] = "prop_ld_flow_bottle"
            } 
        },
        
        ["eatable"] = {
            ["Burger"] = {
                ["price"] = 79,
                ["prop"] = "prop_cs_burger_01"
            },

            ["Hotdog"] = {
                ["price"] = 79,
                ["prop"] = "prop_cs_hotdog_01"
            }

        }
    }, -- You can add more spots by just copying this one and changing the values

    ["Gyro Day"] = {
        ["coords"] = vector3(461.50152587891, -699.02325439453, 27.402139663696),
    },
     
    ["Gyro Day"] = {
        ["coords"] = vector3(998.12, -3091.9, -39.0),
    },

    ["Gyro Day"] = {
        ["coords"] = vector3(132.8, -1462.52, 29.36)
    }

    
}

it’s not working :frowning:

I know this is an old issue that was asked above, but I am just installing this in our server today and ran into the same problem. I found where I made my mistake and see in the code sample above where that person made the same mistake as well so figured I’d post what is wrong in case anyone else has the same problem. You MUST put a comma at the end of the coords. In the sample above, the last Gyro Day coords do not have the comma like the ones above. His should be 29.36),

hey great script how would i be able to turn this into a black market and replace these items with weapons

how can i fix you do not have enough cash on latest es_extended

1 Like