Coder Social home page Coder Social logo

dc-shiftlog's Introduction

dc-shiftlog

This was requested since this one "didn't work" properly. I present you a shift log resource which doesn't handout your Discord webhooks for free ๐Ÿฅณ. Testing and issues are appreciated. But should work as intended.

How do I setup logs?

As you might have noticed from the CreateLog function in server.lua there are some predefined jobs with each triggering their own qb-log trigger https://github.com/Disabled-Coding/dc-shiftlog/blob/e455c5f3d08ef0e38d932aa8388b240c6c4160ee/server.lua#L22 https://github.com/Disabled-Coding/dc-shiftlog/blob/e455c5f3d08ef0e38d932aa8388b240c6c4160ee/server.lua#L26 https://github.com/Disabled-Coding/dc-shiftlog/blob/e455c5f3d08ef0e38d932aa8388b240c6c4160ee/server.lua#L30 You can add as many job specific triggers as you want and add them to your QBCore log recourse. At the time of writing you can find this inside of qb-smallresources/server/logs.lua. And add the following lines with the other webhooks you have setup.

    ['shiftlogPolice'] = '',
    ['shiftlogAmbulance'] = '',
    ['shiftlogRealestate'] = '',

Be aware! The above is case sensitive.

Donations are greatly appreciated

ko-fi

image

dc-shiftlog's People

Contributors

chatdisabled avatar nietthijmen avatar noobysloth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dc-shiftlog's Issues

[ISSUE]

image

image

table.sort(JobCurrentTimes, function(a, b) return a.Time > b.Time end)
TriggerEvent('qb-log:server:CreateLog', 'shiftlogJobLeaderboard', 'Shift Log Job Leaderboard', 'green',
string.format("1. %s | %s minutes \n2. %s | %s minutes \n3. %s | %s minutes \n4. %s | %s minutes \n5. %s | %s minutes \n6. %s | %s minutes \n7. %s | %s minutes \n8. %s | %s minutes \n9. %s | %s minutes \n10. %s | %s minutes \n11. %s | %s minutes \n12. %s | %s minutes | %s minutes \n13. %s | %s minutes",
JobCurrentTimes[1].Name, round(JobCurrentTimes[1].Time, 2), JobCurrentTimes[2].Name, round(JobCurrentTimes[2].Time, 2), JobCurrentTimes[3].Name, round(JobCurrentTimes[3].Time, 2), JobCurrentTimes[4].Name, round(JobCurrentTimes[4].Time, 2),
JobCurrentTimes[5].Name, round(JobCurrentTimes[5].Time, 2), JobCurrentTimes[6].Name, round(JobCurrentTimes[6].Time, 2), JobCurrentTimes[7].Name, round(JobCurrentTimes[7].Time, 2), JobCurrentTimes[8].Name, round(JobCurrentTimes[8].Time, 2),
JobCurrentTimes[9].name, round(JobCurrentTimes[9].time, 2), JobCurrentTimes[10].name, Round(JobCurrentTimes[10].Time, 2), JobCurrentTimes[11].name, Round(JobCurrentTimes[11].time, 2), JobCurrentTimes[12].name, Round(JobCurrentTimes[12].time, 2), JobCurrentTimes[13].name, Round(JobCurrentTimes[13].time, 2)))
Wait(Config.leaderboard.time * 60 * 1000) -- Post log every 12 minutes
end
end
end)

i get this error only i dont know what to do

question

uhmm where should i put the webhook, i don't find anything

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.