Commit Graph

27 Commits

Author SHA1 Message Date
Mycroft eb8152fc4f refactor(sql) 2021-04-06 19:58:41 +01:00
Henric Backman 3490c008ba charid should only be 1 long 2020-05-19 06:54:23 +02:00
Henric Backman 660e535ee4 Now securing DeleteCharacter
plus an additional check added!
2020-05-16 21:21:34 +02:00
Henric Backman 79d0501458 cleanup
added missing trigger
updated readme
2020-05-12 05:06:30 +02:00
Henric Backman 59eaee61c0 finally 2020-05-09 23:43:08 +02:00
Henric Backman bd264d81ac fix identity always showing 2020-05-09 20:33:27 +02:00
Henric Backman ee4fc22e3a this should work 2020-05-09 00:53:27 +02:00
Henric Backman 7ae50e5149 fix get license 2020-05-08 23:56:32 +02:00
Henric Backman fe4c1bca41 this migh work better 2020-05-08 22:11:32 +02:00
Henric Backman 8d45ce70c9 sql injection fix
and some cleanup
2020-05-06 23:39:19 +02:00
Henric Backman 44e3f894cc update
old SpawnCharacter commented away as i updated it to suit my own setup

change display in main-container css if u dont have a way to trigger "kashactersS:SetupCharacters"  and "kashactersC:SetupCharacters"
2020-04-30 00:37:06 +02:00
Henric Backman 5de27e34aa update 2020-04-24 20:30:26 +02:00
Henric Backman 114387498e Fix MySQL to get propper job grade
and filter it if the character is Unemployed
2020-04-10 05:47:34 +02:00
Henric Backman 26ca0a148e this need to be an i 2020-04-10 04:53:39 +02:00
Henric Backman 1fa58f645c Fix cash/bank showing as undefined with new ESX 2020-04-10 04:46:50 +02:00
Dione Batista bbe14d30d3 More Corrections
correction in the camera spawn getting stuck for not finding the player's coordinates
2020-03-26 18:57:53 -03:00
Dione Batista 220f21db35 Correction
Correction for Characters dont loading on login
2020-03-26 18:40:40 -03:00
RikoDEV eef971c08b The user_accounts table has been moved...
...to users in the latest es_extended update.
2020-03-07 11:17:14 +01:00
RikoDEV 640a322853 Update main.lua 2020-02-22 16:30:32 +01:00
RikoDEV 083b545300 Update main.lua 2020-02-22 16:12:40 +01:00
RikoDEV eb2a274d70 We need the entire identifier, string.sub is unnecessary. 2020-02-22 15:58:37 +01:00
RikoDEV ecf073ef61 Fix issues with identifiers... 2020-02-22 15:54:12 +01:00
RikoDEV 8171f9f483 Update main.lua 2020-02-22 15:42:40 +01:00
RikoDEV c22733bb4c Update main.lua 2020-02-22 15:41:58 +01:00
RikoDEV acd4e30fea Fix GetPlayerIdentifiers 2020-02-22 15:41:38 +01:00
RikoDEV f2612dc872 Add support for latest ESX (2/2) 2020-02-22 15:04:26 +01:00
EbenSantuy 5b591a94b5 This I made for people who cant configure the esx_kashacters and to fix all the issue ! thanks to KASH to make this nice Feature
Thanks You KASH (github.com/KASHZIN)Who The Original Develop This ESX_KASHACTERS RELEASE And To for the tutorial XxFri3ndlyxX (github.com/XxFri3ndlyxX)

this tutorial i made little bit use XxFri3ndlyxX tutorial

1.Step One [ essentialmode\client\main.lua ]

Delete Or Replace This !
--[[Citizen.CreateThread(function()
	while true do
		Citizen.Wait(0)

		if NetworkIsSessionStarted() then
			TriggerServerEvent('es:firstJoinProper')
			TriggerEvent('es:allowedToSpawn')
			return
		end
	end
end)]]--

2.Step Two [ es_extended [ LINE : 457 ] client/main.lua ]
This To Fix Cant Open Inventory When You Die And Get Revived

Change You Menu interactions to this !
``` ---Menu interactions
Citizen.CreateThread(function()
	while true do
		
		Citizen.Wait(0)

		if IsControlJustReleased(0, 289) and IsInputDisabled(0) and not ESX.UI.Menu.IsOpen('default', 'es_extended', 'inventory') then
			ESX.ShowInventory()
		end

	end
end)```

3. Step Three 
To Get Your esx_kashacters work you need do this on your database

SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME = 'owner'
And This
SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME = 'indentifier'
Credit @Xnubil

6. Step Six [Fix Datastore]
Duplicate Your esx_datastore or add This line on your esx_datastore server\main.lua

-- Fix was taken from this link --
-- https://forum.fivem.net/t/release-esx-kashacters-multi-character/251613/448?u=xxfri3ndlyxx --
AddEventHandler('esx:playerLoaded', function(source)

  local result = MySQL.Sync.fetchAll('SELECT * FROM datastore')

	for i=1, #result, 1 do
		local name   = result[i].name
		local label  = result[i].label
		local shared = result[i].shared

		local result2 = MySQL.Sync.fetchAll('SELECT * FROM datastore_data WHERE name = @name', {
			['@name'] = name
		})

		if shared == 0 then

			table.insert(DataStoresIndex, name)
			DataStores[name] = {}

			for j=1, #result2, 1 do
				local storeName  = result2[j].name
				local storeOwner = result2[j].owner
				local storeData  = (result2[j].data == nil and {} or json.decode(result2[j].data))
				local dataStore  = CreateDataStore(storeName, storeOwner, storeData)

				table.insert(DataStores[name], dataStore)
			end
		end
	end

	local _source = source
	local xPlayer = ESX.GetPlayerFromId(_source)
  	local dataStores = {}
  
	for i=1, #DataStoresIndex, 1 do
		local name      = DataStoresIndex[i]
		local dataStore = GetDataStore(name, xPlayer.identifier)

		if dataStore == nil then
			MySQL.Async.execute('INSERT INTO datastore_data (name, owner, data) VALUES (@name, @owner, @data)',
			{
				['@name']  = name,
				['@owner'] = xPlayer.identifier,
				['@data']  = '{}'
			})

			dataStore = CreateDataStore(name, xPlayer.identifier, {})
			table.insert(DataStores[name], dataStore)
		end

		table.insert(dataStores, dataStore)
	end

	xPlayer.set('dataStores', dataStores)
end)

Download Link : https://github.com/XxFri3ndlyxX/esx_datastore
Credits : https://github.com/XxFri3ndlyxX

5. Step Five [ Fix Ambulance ]
This To Fix Die Tele And When Your Get Revived You Cant Open any Menu only F2

Download My File the esx_ambulancejob (or download the lastest version esx_ambulancejob :v)

6. Step Six [ Fix your esx_kashacters identifier ]
Download My mysql-async And start on your server.cfg

7. Step Seven [ Fix Your Identifier And Spawn] 
Download My esx_kashacters Modified And start on your server.cfg
Thats All Identifier [esx_kashacters\server\main.lua] maybe thats all
you need in Roleplay Server if you wan to change just change it 

===--------------------------------------------------------------------===

Okey Thats All Make My esx_kashacters work properly if you wanna ask
My Discord : Blue.#5108

Thank you Again to KASH And XxFri3ndlyxX ! :)
ENJOY YOUR ESX_KASHACTERS
2019-07-17 15:26:07 +07:00