Security HUD
System Watchdog
×
Threads Scanned
-- / --
SYS. LOAD --%
AI SHIELD ACTIVE
DMCA Policy
×

📋 DMCA Compliance

This platform and community fully complies with the Digital Millennium Copyright Act (DMCA) and international copyright laws. We take all copyright protection seriously.

🛡️ Copyright Protection

If you believe a posted item belongs to you or violates your copyright, you may file a DMCA takedown request through our official channels. Upon receiving a valid claim, the infringing content will be removed within 24 hours.

What's new
×
Fiveguard

Script R6 multicharacter

Notforyou

Gold Elite
Joined
May 1, 2021
Messages
40
Reaction score
218
Points
296
The best multicharacter script
Download here -
1718494629318.png
 

valleywolf

Bronze Elite
Joined
Nov 22, 2024
Messages
35
Reaction score
4
Points
166
Location
Guayana
# [ESX]
For those using ESX it needs to use it with some operations

save sql data to database

enter file
es_extended>server>main.lua

remove
```lua
RegisterNetEvent('esx:eek:nPlayerJoined')
AddEventHandler('esx:eek:nPlayerJoined', function()
if not ESX.Players[source] then
onPlayerJoined(source)
end
end)
```

add
```lua
local StringCharset = {}
local NumberCharset = {}

for i = 48, 57 do table.insert(NumberCharset, string.char(i)) end
for i = 65, 90 do table.insert(StringCharset, string.char(i)) end
for i = 97, 122 do table.insert(StringCharset, string.char(i)) end

function RandomStr(length)
if length > 0 then
return RandomStr(length-1) .. StringCharset[math.random(1, #StringCharset)]
else
return ''
end
end

function RandomInt(length)
if length > 0 then
return RandomInt(length-1) .. NumberCharset[math.random(1, #NumberCharset)]
else
return ''
end
end

function SplitStr(str, delimiter)
local result = { }
local from = 1
local delim_from, delim_to = string.find( str, delimiter, from )
while delim_from do
table.insert( result, string.sub( str, from , delim_from-1 ) )
from = delim_to + 1
delim_from, delim_to = string.find( str, delimiter, from )
end
table.insert( result, string.sub( str, from ) )
return result
end

ESX.Login = function(source, citizenid, newData)
if source ~= nil then
if citizenid ~= false then
loadESXPlayer(citizenid,source)
else
local accounts = {}
for account,money in pairs(Config.StartingAccountMoney) do
accounts[account] = money
end
local playerData = {}
local identifier
local charinfo = {}
firstname = newData.charinfo.firstname
lastname = newData.charinfo.lastname
sex = newData.charinfo.sex
birthdate = newData.charinfo.date
cid = newData.cid
-- local citizenId = GetPlayerIdentifiers(source)[1]
local citizenId = CreateCharId(source)
MySQL.Async.execute('INSERT INTO users (accounts, identifier, lastname, firstname, sex, dateofbirth) VALUES (@accounts, @identifier, @lastname, @firstname, sex, @dateofbirth)', {
['@accounts'] = json.encode(accounts),
['@identifier'] = citizenId,
['@firstname'] = firstname,
['@lastname'] = lastname,
[' sex'] = sex,
['@dateofbirth'] = birthdate
}, function(rowsChanged)
loadESXPlayer(citizenId,source)
end)
end
return true
else
return false
end
end



function CreateCharId(source)
local UniqueFound = false
local CitizenId = nil

while not UniqueFound do
CitizenId = tostring(RandomStr(3) .. RandomInt(5)):upper() .. ":"..GetPlayerIdentifiers(source)[1]
MySQL.Sync.fetchAll("SELECT * FROM users WHERE identifier LIKE '%"..CitizenId.."%'", {}, function(result)
if #result == 0 then
UniqueFound = true
end
end)


end

local CitizenId = CitizenId
return CitizenId
end
```






 
Top