Arnolds Posted February 1, 2022 Posted February 1, 2022 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
๖ۣۜζ͜͡RapGod Posted February 1, 2022 Posted February 1, 2022 I did not understand what the problem actually is. Can u please clarify? So we can have a clear vision and be able to help u.
Arnolds Posted February 2, 2022 Author Posted February 2, 2022 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.
๖ۣۜζ͜͡RapGod Posted February 4, 2022 Posted February 4, 2022 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)
Hydra Posted February 4, 2022 Posted February 4, 2022 (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 February 4, 2022 by Hydra
Unique Posted February 4, 2022 Posted February 4, 2022 (edited) There is not enough spaces losis Edited February 4, 2022 by Unique
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