Giter VIP home page Giter VIP logo

k5_skillcheck's Introduction

K5 Shops

K5 Skillcheck

This is a FREE and open Fivem script that was created for everyone to use. The goal of this script is to create a skillcheck system inspired by Dead By Daylight's system, that doesn't use HTML canvases. Canvas can require a lot of resources from lower end PCs. This script uses JS, HTML and CSS only and utilizes progressbar.js.

Demo

Watch the demo here: YouTube

Download & Installation

Using Git

cd resources

git clone https://github.com/kac5a/k5_skillcheck.git [scripts]/k5_skillcheck

Manually

Installation

Add this in your server.cfg:

ensure k5_skillcheck

Usage

This script doesn't work alone, it needs to be called with an export. I created an example script that uses this skillcheck system, which is shown in the demo video. You can get that script here. There are 3 difficulty levels that you can add in the function call, "easy", "normal", "hard", but it's not required. If no parameter is defined, the default difficulty is normal.

Simple usage with 3 skillchecks before success:

if IsControlJustReleased(0, 38) then
	Citizen.Wait(1000)
	if exports["k5_skillcheck"]:skillCheck("easy") then
		Citizen.Wait(1000)
	    	if exports["k5_skillcheck"]:skillCheck("normal")  then
			Citizen.Wait(1000)
			if exports["k5_skillcheck"]:skillCheck("normal") then
				SuccessFunction() -- This is the event that happens if all 3
						  -- of the skillchecks succeed
			else
				FailFunction1() -- This is the event that happens if
						-- the user misses the 3rd skillcheck
			end
		else
			FailFunction2() -- This is the event that happens if
			                -- the user misses the 2nd skillcheck
		end
	else
		FailFunction3() -- This is the event that happens if
				-- the user misses the 1st skillcheck
	end
end

You can create as many steps as you want, you just need to add more if-else statements.

Last Words

Feel free to fork this repository and edit the script as much as you'd like. This script is free to use and share. If you find anyone selling this for money, please contact me.

k5_skillcheck's People

Contributors

kac5a 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.