wasd
DiscordTebex
  • Welcome
  • Getting Started
    • What is Escrow
  • Other Things
    • Editing localization files
  • Resources
    • Mix-Weed
      • Installation
      • How To Do
        • Items
        • Config
      • Modules
        • Weed Type
        • Recipe Type
          • Recipe onUsed
    • ATM Robbery [Free]
      • Items
    • 24/7 Shop
    • Multiplayer Delivery Job
    • 🗞️Multiplayer Newspaper Job
    • Multiplayer Garbage Job
    • Multiplayer Tow Job
      • Exports / Events
    • Daily Rewards Script
Powered by GitBook
On this page
  • Animation
  • Ingredient
  • UsedEventHandler
  • onRecipeUsed
  • onEffectOver
  • Recipe
  • Examples
  1. Resources
  2. Mix-Weed
  3. Modules

Recipe Type

All mix recipe is formatted as an array containing objects with the following properties.

PreviousWeed TypeNextRecipe onUsed

Last updated 2 months ago

Animation

Defines animation settings for interactions. Not Required

Property
Type
Default
Description

dict

string

required

Animation dictionary.

clip

string

required

Animation clip.

flag

number

0

Animation flag.

prop

nil

Prop settings for the animation.

scenario

string

nil

Must specify either scenario or dict.

Ingredient

Property
Type
Default
Description

name

string

required

Item name

label

string

required

Item label

count

number

required

Item count

imagePath

string

nil

If not specified, name.png will be used

UsedEventHandler

You can do anything you want to be triggered when the recipe item is used.

Contains the recipe param value used in event and export

Property
Type
Description

event

string

Event name

func

function

Function can be specially created

export

string

Export name

anim

Only valid on client side Not required

onRecipeUsed

Triggered when the recipe is used

Property
Type
Description

client

Client-side event handler

server

Server-side event handler

duration

number

onEffectOver

Event handler for when effect is over

Property
Type
Description

client

Client-side event handler

server

Server-side event handler

Recipe

You can set the contents of all recipes that can be produced by players at the mixing table

Property
Type
Description

active

boolean

Whether the weed type is active (default: true).

label

string

Descriptive label for the recipe.

itemName

string

Name of the item to be given to inventory when mixed and usable

imagePath

string

If not specified, .png will be used

level

number

Minimum level required to produce the item

reputationLevel

number

Minimum reputation level required to produce the item

ingredients

List of ingredients required for the recipe

removeAfterUsed

boolean

Set to true to remove the item after it has been used

onUsed

Functions/Events triggered after using the item

onEffectOver

Functions/Events triggered after the effect is over

description

string

Description of the recipe

policeAlertChange

number

Percentage of police dispatch when something is mixed on the table


Examples

[1] = {
    itemName = 'drug_sprint',
    label = 'Drug Sprint Dust',
    imagePath = 'drug.png',
    reputationLevel = 1,
    ingredients = {
        { count = 3, name = 'sativa_leaf', label = 'Sativa Leaf' },
        { count = 3, name = 'indica_leaf', label = 'Indica Leaf' },
    },
    description = 'Increases your speed for a short time',
    removeAfterUsed = true,
    onUsed = {
        duration = 15000,
        client = {
            event = 'wasd-mixweed:recipe:onUseDrugSpring',
        },
    },
},
[2] = {
    itemName = 'drug_blurredwater',
    label = 'Blurred Water',
    imagePath = 'water.png',
    reputationLevel = 3,
    ingredients = {
        { count = 1, name = 'drug_poison', label = 'Drug Poison', imagePath = 'drug.png' },
        { count = 1, name = 'water',       label = 'Water' },
    },
    description = 'Water mixed with poison',
    removeAfterUsed = true,
    onUsed = {
        duration = 10000,
        client = {
            event = 'wasd-mixweed:recipe:onUseDrugBlurredWater',
            anim = {
                dict = 'mp_player_intdrink',
                clip = 'loop_bottle',
                prop = {
                    model = 'prop_ld_flow_bottle',
                    pos = vec3(0.03, 0.03, 0.03),
                    rot = vec3(0.0, 0.0, -1.5)
                },
            },
        },
    },
},

Time after which the item will be available again and will be triggered (default: 10000)

Animations
Prop
Animation
UsedEventHandler
UsedEventHandler
onEffectOver
UsedEventHandler
UsedEventHandler
table<key, Ingredient>
onRecipeUsed
onEffectOver