qalle
September 8, 2018, 8:14pm
1
This is a script that makes you able to retrieve bottles from all trashbins around the map, you then sell them for a small price at the mall in the ghetto. Positions are changed in Coordinates table.
If you find any bug feel free to comment down below.
If you wanna give feedback on improvements feel free to comment down below.
Download
esx-ecobottles
Preview
29 Likes
This can be useful, Keep it up man!!
qalle
September 8, 2018, 9:01pm
4
Thanks, ye very simple but cool function
Hey,
where we can change the price?
can you add a TriggerClientEvent(“pNotify:SendNotification”, source, {?
cordially
qalle
September 9, 2018, 12:00am
6
Server.lua,
local randomMoney = math.random(1, 4)
1 Like
Nice script keep up the good ideas
2 Likes
Hi! I tried to add more objects but when I add them nothing happens. I can’t even interract with the new props just the old ones that are already in.
I added them here:
local entity, distance = ESX.Game.GetClosestObject({
'prop_bin_01a',
'prop_bin_03a',
'prop_bin_05a',
'prop_bin_04a',
'prop_bin_11a',
'prop_bin_11b',
'prop_bin_12a',
'prop_bin_13a',
'prop_bin_14a',
'prop_bin_14b',
'prop_bin_delpiero',
'prop_bin_delpiero_b',
'prop_bin_beach_01d',
'prop_cs_bin_01',
'prop_cs_bin_01_lid',
'prop_cs_bin_01_skinned',
'prop_cs_bin_02',
'prop_cs_bin_03',
})
2 Likes
qalle
September 9, 2018, 1:22pm
10
Seems wierd should work, all of em is real entitys?
I copied them from there https://gist.github.com/leonardosnt/53faac01a38fc94505e9 Can you add these bins in your script?
Destiny
September 9, 2018, 6:21pm
12
Try getting rid of your last comma?
Awesome resource! Can’t wait to see more of your work.
Do I have? The guy who wrote the script didn’t do that but I try it out.
thank you for release. Very interactive for rp servers
Curious How you got the background on yours like in the picture
Mine ^^
Yours…
qalle
September 11, 2018, 4:48pm
18
It’s because my ESX.Game.Utils.DrawText3D is remade to fit to my notifications.
Im using drawRct
@KrizFrost
local factor = (string.len(text)) / 370
DrawRect(_x,_y+0.0125, 0.015+ factor, 0.03, 41, 11, 41, 68)
Add that to your DrawText function. ^^^
function DrawText3D(x,y,z, text)
local onScreen,_x,_y=World3dToScreen2d(x,y,z)
local px,py,pz=table.unpack(GetGameplayCamCoords())
SetTextScale(0.35, 0.35)
SetTextFont(4)
SetTextProportional(1)
SetTextColour(255, 255, 255, 215)
SetTextEntry("STRING")
SetTextCentre(1)
AddTextComponentString(text)
DrawText(_x,_y)
local factor = (string.len(text)) / 370
DrawRect(_x,_y+0.0125, 0.015+ factor, 0.03, 41, 11, 41, 68)
end
It should look something like that^^^
2 Likes
DTPL
September 14, 2018, 12:39am
20
I’m expanding this script to possibly find things like cigarettes, alcohol, etc.
Do u want pull request or separate it, because it will not be just “ecobottles” anymore?