Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- made by rose#0415
- print("Du har nu loaded et høst animations script lavet af rose.")
- local farm = {
- {x=2217.5212402344,y=5578.703125,z=53.725204467773} -- weed farm
- }
- Citizen.CreateThread(function()
- -- while true do
- -- for k,v in pairs(farm) do -- for flere farme
- if GetDistanceBetweenCoords(farm.x, farm.y, farm.z, GetEntityCoords(GetPlayerPed(-1))) < 5.0 then
- DrawText3D(farm.x, farm.y, farm.z, "Tryk på B for at begynde at farme.");
- if IsControlPressed(0, 57) then
- TaskPlayAnim(GetPlayerPed(-1), animDict, 'WORLD_HUMAN_GARDENER_PLANT', 8.0, -8.0, 2700, 50, 0.0, true, true, true)
- while not HasAnimDictLoaded("WORLD_HUMAN_GARDENER_PLANT") do
- wait(0)
- end
- if IsControlPressed(0, 57) then
- if not IsPedInjured(GetPlayerPed(-1)) then
- ClearPedSecondaryTask(GetPlayerPed(-1))
- end
- if not IsPedInAnyVehicle(GetPlayerPed(-1), 1) then
- SetPedCurrentWeaponVisible(GetPlayerPed(-1), 1, 1, 1, 1)
- end
- end
- end
- end
- end)
- -----------------------------------------------------------
- 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, 20,20,20,150)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement