Jump to content

[HELP] 420 system


Arnolds

Recommended Posts

Posted

Hi,basiclly i need to weed plant show pertcent on plant.

i dont know how to do it,becuse im new to this

here is scirpt 

 

 
Quote

 

function addWeedButtons (button, state, absX, absY, wx, wy, wz, element)

 

    if (element) and (getElementType(element)=="object") and (button=="right") and (state=="down") then --if it's a right-click on a object

 

        local model = getElementModel(element)

 

        local rcMenu

 

        if(model == 2203 and getElementData(element, "weed:level") > 0) then

 

            local x, y, z = getElementPosition(localPlayer)

 

            local x2, y2, z2 = getElementPosition(element)

 

            if (getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) > 5) then return end

 

            rcMenu = exports.rightclick:create("Marihuāna")

 

            local row = exports.rightclick:addRow("Paostīt")

 

            local row2 = exports.rightclick:addRow("Novākt")

 

            addEventHandler("onClientGUIClick", row,  function (button, state)

 

                smellWeed(element)

 

            end, true)

 

            addEventHandler("onClientGUIClick", row2,  function (button, state)

 

                harvestWeed(element)

 

            end, true)

 

        end

 

    end

 

end

 

addEventHandler("onClientClick", getRootElement(), addWeedButtons, true)

 

 

 

 

 

 

 

 

function smellWeed (element)

 

    if element and getElementModel(element) == 2203 then

 

        triggerServerEvent("onWeedCheck", resourceRoot, element)

 

    end

 

end

 

 

 

 

 

 

 

 

function harvestWeed (element)

 

    if element and getElementModel(element) == 2203 then

 

        triggerServerEvent("harvestWeed", resourceRoot, element)

 

    end

 

end

 

 

 

 

 

Posted

 

I need when you approach the plant then show interest on him as it has grown

if u ask,i will send full script,with effect.may be there ir plant weed.

Posted
On 02/02/2022 at 23:17, Arnolds said:

 

I need when you approach the plant then show interest on him as it has grown

if u ask,i will send full script,with effect.may be there ir plant weed.

Yes plz go ahead, but please try to explain the problem in a better way cause i'm unable to understand ur english(not being offensive tho)

Posted (edited)

From what I understand, he wants an effect for plants to grow when you approach them. ?. If this is what he is asking then he can make it with setObjectScale since plants are objects or with a shader. With script he could use colshape events

Edited by Hydra

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...