rssVending Machines (vending)
Category: | script |
---|---|
Author(s): | R3mp |
Downloads: | 3844 |
Rate: | You need to be logged in to vote |
Rating: | 3.8 (50 Votes) |
Description:
This resource adds vending machine functionality, just like in single player
forum thread: http://forum.multitheftauto.com/viewtopic.php?f=108&t=25554
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 cancelled 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...
(more)
forum thread: http://forum.multitheftauto.com/viewtopic.php?f=108&t=25554
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 cancelled 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...
(more)