mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 17:28:53 +00:00
5b591a94b5
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
70 lines
4.1 KiB
HTML
70 lines
4.1 KiB
HTML
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
<!-- Custom CSS -->
|
|
<link rel="stylesheet" type="text/css" href="css/main.css" />
|
|
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
|
|
<!-- Bootstrap CSS -->
|
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
|
<!-- Google Fonts -->
|
|
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
|
|
</head>
|
|
<body style="background-color: rgba(0,0,0,0); font-family: 'Roboto', sans-serif !important;">
|
|
<div class="main-container">
|
|
<div class="character-container">
|
|
<div class="character-box" data-ischar="false" data-charid="1">
|
|
<h3 class="character-fullname"><i class="fas fa-plus"></i></h3>
|
|
<div class="character-info">
|
|
<p class="character-info-new">Create new character</p>
|
|
</div>
|
|
</div>
|
|
<div class="character-box" data-ischar="false" data-charid="2">
|
|
<h3 class="character-fullname"><i class="fas fa-plus"></i></h3>
|
|
<div class="character-info">
|
|
<p class="character-info-new">Create new character</p>
|
|
</div>
|
|
</div>
|
|
<div class="character-box" data-ischar="false" data-charid="3">
|
|
<h3 class="character-fullname"><i class="fas fa-plus"></i></h3>
|
|
<div class="character-info">
|
|
<p class="character-info-new">Create new character</p>
|
|
</div>
|
|
</div>
|
|
<div class="character-box" data-ischar="false" data-charid="4">
|
|
<h3 class="character-fullname"><i class="fas fa-plus"></i></h3>
|
|
<div class="character-info">
|
|
<p class="character-info-new">Create new character</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="character-buttons">
|
|
<button class="btn btn-play" id="play-char">PLAY</button>
|
|
<button class="btn btn-delete" id="delete" data-toggle="modal" data-target="#delete-char">DELETE</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="delete-char" class="modal fade" role="dialog">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<h5>Are You Sure?</h5>
|
|
<hr>
|
|
<p>By deleting your account we won't be able to recover it, all properties, cars etc. will be deleted</p>
|
|
<hr>
|
|
<div class="modal-footer">
|
|
<button id="deletechar" class="btn btn-delete" data-toggle="modal" data-dismiss="modal">DELETE</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
|
|
<script src="js/app.js" type="text/javascript"></script>
|
|
</body>
|
|
</html> |