Jump to content

[REL] Vending Machines 1.2


Remp

Recommended Posts

This resource adds vending machine functionality, just like in single player

download: https://community.multitheftauto.com/index.php?p= ... ils&id=471

t_1125.pngt_1124.png

Features:

- buying of food/drink from all possible vending machine types

- different sounds for different foods

- different animations for each vending machine

Vending machines can be used with the enter/exit key as normal. You must have enough money and less than full health to be able to buy from a vending machine

Some vending machines may have been missed and therefore not work, if you find one please post the rough coordinates (and interior if necessary) so it can be added (you can also add it to the map file yourself)

Exported functions (for full explanations see the meta file):

- plotMachine(machine)

- plotMachineServer(player,machine)

- disableMachine(machine)

- disableMachineServer(player,machine)

- useVendingMachine(machine)

- useVendingMachineServer(player,machine)

- stopVendingMachineAnimation(local player)

- stopVendingMachineAnimationServer(player)

- isPlayerInFrontOfVendingMachine()

- isPlayerUsingVendingMachine()

Using these functions you are given full control over the vending machines in the game. You can enable or disable them as you please, enable or disable them for only specific people and create your own. All vending machine objects created by the server will, by default, be added as a working vending machine. You can set the element data "dont_plot_machine" on the object to prevent them being automatically included

Events (clientside):

- onClientPlayerUseVendingMachine() - called before the player begins using the machine, can be canceled to stop the machine being used (source is the player using the machine)

- onClientPlayerUsedVendingMachine() - called once the player has finished using the vending machine (source is the player who used the machine)

Known issues:

- the first time the animation is used it may result in the animation becoming "stuck", this can be fixed by simply forcing an animation change (eg: jumping,shooting)

- the fast food stands can be destroyed, but this is not synced by mta, leaving a working marker without a stand. The stand will reappear when you restream the area

Edited by Guest
Link to comment

new version uploaded with audio compression, zipped resource is now 182kb (from 340kb)

https://community.multitheftauto.com/index.php?p= ... ils&id=471

i am hesitant to compress it any further because the loss of quality is quite apparent (even with the current compression), but you can always compress them further yourself if you want

original quality (uncompressed) files are available here if anyone wants them

Link to comment
  • 1 month later...
  • 1 year later...

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