[Release] Basic Breathalyzer and Inventory Script

Hello! Here are my (very) basic breathalyzer and inventory scripts

---------------Breathalyzer-----------------

breathalyzer

Features:

  • Stores player’s B.A.C. levels via their player id
  • Easily checkable
  • Requires no additional frameworks or libraries
  • Automatically clears the B.A.C upon the player leaving
  • Includes password protected command to clear all B.A.C. levels and wipe the table

Commands:

  • “/bacset [number]” Sets your B.A.C. level and attaches it to your player id
  • “/bactest [playerid]” Tests a player’s B.A.C. level
  • “/bacclear” Clears your B.A.C. level
  • “/bacclearall [password]” Clears all B.A.C. levels, the password can be changed in the server.lua

How it works:
Upon receiving the “/bacset” command, it will take the second word (if it exists) and places it into an array, based off of the current player’s id. The “/bactest” command then will take the given id and check for an entry in the array at that location.

breathalyzer.zip (1.5 KB)

---------------Inventory-----------------

search

Features:

  • Stores player’s ped and vehicle inventory (based off of what they enter)
  • Easily checkable
  • Requires no additional frameworks
  • Automatically clears both inventories upon player leaving

Commands:

  • “/setpedinv [items]” Sets your current player inventory
  • “/setvehinv [items]” Sets your current vehicle inventory
  • “/searchped [playerid]” Searches the given player’s inventory
  • “/searchveh [playerid]” Searches the given player’s vehicle inventory
  • “/clearinv” Clears both of your inventories
  • “/clearallinv [password]” Clears all player’s inventories, the password can be changed in the server.lua
  • “/clearoneinv [playerid] [password]” Clears a specific player’s inventories, the password can be changed in the server.lua

How it works:
Upon receiving the “/setpedinv” or “/setvehinv” command, it will take the second word (if it exists) and places it into an array, based off of the current player’s id. The “/searchped” or “/searchveh” command then will take the given id and check for an entry in the array at that location.

search.zip (1.6 KB)


If you have any issues please let me know, and I will do my best to fix them!

14 Likes

Moved to #development:releases

2 Likes

ACTUALLY.

i did.

6 Likes

Cool!

20 charrrrrrrrrrrr

1 Like

Awesome was looking for a script like this!

2 Likes

Glad I could supply! @Blaine

Thanks for this release. This is awesome. I love it.

1 Like

This is nice, thanks!

1 Like

Nope?

2 Likes

i did on my screen.

2 Likes

Would anyone make this into a gui for me? I do not have enough knowledge to do it myself. if not that’s fine too.

How would I implement this into RP, would it be hard to raise the BAC of a player that uses the drink beer emote or something like that?And make it go down slowly if the player hasn’t consumed any more
Any thoughts or leads?

@SendMeMemes I’m not sure of how it would be possible, they could set it themselves based off of how much they’ve been drinking.

@dracuslayer I may look into using one of the gui frameworks there are, if I ever progress on that I’ll be sure to let you know!

1 Like

sounds good thank you.

1 Like

@ZefTheFox would it be to much trouble to make these results for both scripts to come up as a notification instead of coming up in chat?

Why would you want that lol? When it’s in the chat, you can easily refer to it just by opening the chat. Having it show up as a notification would not make much sense.

Because we don’t use the chat screen much and I don’t like to see all that crap on the screen when I press T to chat.

2 Likes

@SWood I can look into it, no promises though

@ZefTheFox no problem thanks for looking.

1 Like