Giter Site home page Giter Site logo

the-neco / esx_kashacter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fivem-ex/esx_kashacter

0.0 1.0 0.0 445 KB

๐Ÿ”ฎ esx_kashacter - Multi Characters for es_extended framework.

Home Page: https://github.com/FiveEYZ/esx_kashacter

Lua 44.85% TSQL 5.12% CSS 5.10% JavaScript 21.56% HTML 23.37%

esx_kashacter's Introduction

โš ๏ธ The supported fork is here. โžก๏ธ https://github.com/FiveEYZ/esx_kashacter


Archived readme

๐Ÿ’ป You can download es_extended here: https://github.com/ESX-Org/es_extended

If you are updating ESX, be sure to update all scripts and DATABASE SCHEMA!

How it works

What this script does it manipulates ESX for loading characters So when you are choosing your character it changes your Rockstar license which is normally license: to Char: this prevents ESX from loading another character because it is looking for you exact license. So when you choose your character it will change it from Char: to your normal Rockstar license (license:). When creating a new character it will spawn you without an exact license which creates a new database entry for your license.


Required changes:

  • es_extended: (es_extended/client/main.lua)

Remove this code (74 - 76):

Citizen.Wait(3000)
ShutdownLoadingScreen()
DoScreenFadeIn(10000)
  • es_extended: (es_extended/client/main.lua)

Replace this code:

local isPaused, isDead, pickups = false, false, {}

Citizen.CreateThread(function()
	while true do
		Citizen.Wait(0)

		if NetworkIsPlayerActive(PlayerId()) then
			TriggerServerEvent('esx:onPlayerJoined')
			break
		end
	end
end)

with:

local isPaused, isDead, isFirstSpawn, pickups = false, false, true, {}

RegisterNetEvent('esx:kashloaded')
AddEventHandler('esx:kashloaded', function()
	if isFirstSpawn then
		TriggerServerEvent('esx:onPlayerJoined')
	end
end)
  • es_extended: (es_extended/server/main.lua)

Change this code in onPlayerJoined(playerId) function in 2 PLACES:

	for k,v in ipairs(GetPlayerIdentifiers(playerId)) do
		if string.match(v, 'license:') then
			identifier = string.sub(v, 9)
			break
		end
	end

replace both of them with:

	for k,v in ipairs(GetPlayerIdentifiers(playerId)) do
		if string.match(v, 'license:') then
			identifier = v
			break
		end
	end

Read carefully...

You MUST increase the character limit in the users table for row identifier to 48.

Do not use essentialsmode, mapmanager and spawnmanager!

Pay ATTENTION: You have to call the resource esx_kashacter in order for the javascript to work!*

Multiple languages support

Just change locales/en.js in html/ui.html (line 10)

___

Contributors

Thanks to KASH and XxFri3ndlyxX!

Contributors

esx_kashacter's People

Contributors

dioneb avatar ebensantuy avatar fiveeyz avatar koolaiddtv avatar rex2630 avatar rikodev avatar sw1ft avatar uniixx avatar

Watchers

 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.