Name = Coffee Machine Version 0.1
This is a script that adds coffee machine .
The coffee machine works in the police station and the shops .
This gives you a coffee in your inventory .
Just go to the machine and press key
https://image.noelshack.com/fichiers/2017/21/1495902991-caferphoto.png
Installation
Coffeemachine.rar (3.9 KB)
Requirements
VDK Inventory
es_freeroam
Essentialmode
Food Hud V0.3.3
SQL
Installation
Install requirements
Download coffemachine folder
Put this folder to resources folder in your server
Add coffeeSQL.sql to your database
Add coffeemachine in AutoStartResource
Changelog
2017-05-27 V0.1
2017-05-28 V0.1.1
Change Item id in clientcoffee.lua for corresponding mysql
Sorry for my english im french
@Credit : Mo_SnipZo (Bk_Food)
5 Likes
Oskr
May 27, 2017, 4:26pm
3
Good stuff but Can you share any screenshots of menu please ? ^^
Thank you capture were added
Remplace in the SQL file:
(19, ‘Café’, ‘False’, 10, 1),
by
(19, ‘Café’, 0, 10, 1);
How did you get your role to display at top right corner? I have cops/paramedics, every job set up, but how would I do that?
Just take update job system
oh okay that worked, thanks
oxygen
May 27, 2017, 10:23pm
9
Please adjust/improve your script to fit the following;
Use the correct control group instead of the Keys table. (FiveM Wiki: Controls )
Please update your code to the latest manifest version and use the correct natives.
@Sqiual67 please rephrase your question in English .
There is another small error in the script
In clientcoffee.lua
line:
TriggerEvent("player:receiveItem", 6, 1)
That gets you item 6 once!
In the Db item coffé = 19
replace for:
TriggerEvent("player:receiveItem", 19, 1)
Moderator edit: Added code tags.
Thanks Sqiual67 i update this script . Error Fix in clientcoffee.lua
ye, i don’t write it because i’ve modified the item number in my database then in my client too :p, but it’s true!
Hello, we have a problem with the script without understanding why …
We have added :
menus = {
[34] = {
calories=0,
water=12,
needs=-7,
drunk=0
},
id 34
libelle cafe
isillegal 0
value 10
type 1
When we want to use coffee we have a message saying “you can not use this item”
While this works without any problem for the rest.
Thank you for your help
MiDooM
September 3, 2017, 9:41pm
18
Hi, anyone have a Fx version plz ?
I HAVE A PROBLEM IF I PRESS ON BUY COFFEE NOTHING HAPPEND how can i fix it
What is the Coffemachine prop name? Can’t find it :S