GithubHelp home page GithubHelp logo

kunaltak606 / vc-vote Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vcodescripts/vc-vote

0.0 0.0 0.0 169 KB

Nopixel Inspired Voting Script, Detailed Config And Easy To Use.

License: MIT License

JavaScript 24.46% Lua 34.43% CSS 28.61% HTML 12.50%

vc-vote's Introduction

vC-vote

Nopixel Inspired Voting Script, Detailed Config And Easy To Use.

vCode Scripts https://github.com/vCodeScripts & https://discord.gg/37KhvMstyx

What is This Script? This Script Allows You To Start Votings For An Election. It simplifies the whole process of voting and choosing a mayor/president in-game. Everytime you start a election you have to delete everything in votes.json and replace it with {} . This just clears out the table of who voted and for who. To add new candidates and change some settings you can always edit vCode.lua. This is the config of this script.

Some Examples:

Photo: https://prnt.sc/bkNn0jwDz2i9

Video: https://streamable.com/e8y9jt

Metadata Item Photo: https://prnt.sc/s2LvRV1XQ5P

Installation: If you don't want to give a Voting Pin After Someone Voted, You Can Just Drag And Drop Our Script Into Your Resources Folder. FOR PEOPLE WHO WANT THE META-ITEM OPTION

FIRST: Enable vCode.GiveItem in vCode.lua, you can do that by changing the option from false to true.

Secondly, add this line of code into your items.lua (qb-core/shared/items.lua) ['votingpin'] = {['name'] = 'votingpin', ['label'] = 'I Voted!', ['weight'] = 0, ['type'] = 'item', ['image'] = 'votingpin.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = 'You Voted'},

Then, Add The Image Inside The inv-img folder into your qb-inventory/html/images/ folder.

Then Head On Into the js folder in qb-inventory/html. Open the app.js file.

Once Opened, Search For FormatItemInfo. You Should find a function named FormatItemInfo.

Paste The Below Given Code Into The Function

else if (itemData.name == "votingpin") { console.log('geldi') $(".item-info-title").html("

" + itemData.label + " "); $(".item-info-description").html( "

Election: " + itemData.info.election + " "); }

Your Code Should Look Something Like This: https://prnt.sc/V1P80U12F3wO

Then You Are Finished And Ready To Go, Startup Your Server And Have Fun. DISCLAIMER ! DONT FORGET TO RESTART YOUR SERVER AFTER YOU ADDED THE CHANGES IN items.lua

Have Fun,

whit3 and poyraz - vCode 2022

vc-vote's People

Contributors

poypoydev avatar

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.