Remp Posted October 13, 2009 Share Posted October 13, 2009 (edited) This resource adds vending machine functionality, just like in single player download: https://community.multitheftauto.com/index.php?p= ... ils&id=471 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 October 14, 2009 by Guest Link to comment
=RM=Mario Posted October 14, 2009 Share Posted October 14, 2009 Nice work,really cool script.ill be using it Link to comment
XetaQuake Posted October 14, 2009 Share Posted October 14, 2009 Works very good, i found no Bugs. Also, it's very useful, thanks But the size of the resource seems me a little bit to large. Can't you try to bring down the sound files size a little bit? Link to comment
Remp Posted October 14, 2009 Author Share Posted October 14, 2009 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
Gobe Posted December 12, 2009 Share Posted December 12, 2009 can you actually see the bottle in ur player's hand while you are drinking it? Link to comment
Remp Posted December 12, 2009 Author Share Posted December 12, 2009 not at the moment, i will look into adding that when i get a spare few minutes Link to comment
Gobe Posted December 13, 2009 Share Posted December 13, 2009 well i heard it's possible with "getPedBonePosition" and some mathematics. Link to comment
Vigilante8 Posted January 23, 2011 Share Posted January 23, 2011 How i can put light in the drink machine to avise players? and need advise in the chat Example:Press 'enter' to eat Great script! Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now