Functions
ExtractIdentifiers
View
Returns table of extracted identifiers of player.
local easyCore = exports["easyCore"]:GetServerObject()
easyCore.Functions.ExtractIdentifiers(PlayerId)
return {
Steam = steamid,
License = license,
Discord = discord,
XBL = xbl,
LiveID = liveid,
IP = ip
}
Notifications
View
Example
Server
local easyCore = exports["easyCore"]:GetServerObject()
easyCore.Functions.Notify(PlayerId, "success", "Data saved!", 4*1000)
Client
local easyCore = exports["easyCore"]:GetClientObject()
easyCore.Functions.Notify("success", "Data saved!", 4*1000)
Styles
error - Red Notification
success - Green Notification
blue - Blue Notification
Arguments
Server
Player
Type
Message
Length
Client
Type
Message
Length
Notes
Length is optional and will default to 4*1000 which is 4 seconds.
Player
General
Find Player
View
Find by Player ID
local easyCore = exports["easyCore"]:GetServerObject()
local success, data = easyCore.Player.GetPlayerById(PlayerId)
Find by Citizen ID
local easyCore = exports["easyCore"]:GetServerObject()
local success, data = easyCore.Player.GetPlayerByCitizenId(CitizenId)
Find by Discord ID
local easyCore = exports["easyCore"]:GetServerObject()
local success, data = easyCore.Player.GetPlayerByDiscord(DiscordId)
Find by Steam
local easyCore = exports["easyCore"]:GetServerObject()
local success, data = easyCore.Player.GetPlayerBySteam(Steam)
Find by IP
local easyCore = exports["easyCore"]:GetServerObject()
local success, data = easyCore.Player.GetPlayerByIP(IP)
Find by Xbox Live Id
local easyCore = exports["easyCore"]:GetServerObject()
local success, data = easyCore.Player.GetPlayerByXboxLiveId(Id)
Find by Live ID
local easyCore = exports["easyCore"]:GetServerObject()
local success, data = easyCore.Player.GetPlayerByLiveId(Id)
Alternative
You can use the backend method of using easyCore.Player.GetPlayerByIdentifier(Identifier, LookFor)
, loops through the table of players to find the player by the stated identifier in the identifier data table.
local easyCore = exports["easyCore"]:GetServerObject()
local success, data = easyCore.Player.GetPlayerByIdentifier("CitizenId", "XX-XXX-XX")
Characters
Each character has a character that is not unique. Each player has a default character named John Doe
players can edit & customize. The Default character id is 1
.
Login
In order to access player data they are required to log in. You can manually log them into their character using easyCore.Player.Login(PlayerId, CharacterId)
. A player is unable to log in unless they have a character created, a character will be automatically created when the Login function is called for the first time for the player to ensure zero data issues. Once its auto-created using easyCore.Player.Create(PlayerId)
the data will be saved into the database and login re-called.
Player Object
Player Object can only be strictly interacted with by the server.
Functions
View
PlayerObject.Functions.Save(ShowNotification)
-- Returns boolean value if successful or not.
-- ShowNotification is optional, it is a boolean value to show a notification if successful or not to the player.
PlayerObject.Functions.UpdateCoords(autosave boolean)
-- Updates player ped in table & coords. Returns true if successful Will not auto-save to database unless boolean is true.
PlayerObject.Functions.UpdatePed(autosave boolean)
-- Updates player ped in table. Returns true if successful Will not auto-save to database unless boolean is true.
PlayerObject.Functions.UpdateIdentifiers(autosave boolean)
-- Updates player identifiers. Returns true if successful. Will not auto-save to database unless boolean is true.
Disclaimer
We tried to model easyCore around QBCore & ESX to help you with easy modding with our system. If you encounter any issues or bugs please message the easyCore team immediately! easyCore team members can be found on the group’s page, do not dm the developers, please message the group and one of us will respond shortly.
We are not responsible for stupidity. (MySQL mess ups caused by you).
Selling products utilizing easyCore must include a direct link to easycore.rampage.place & notice you are not affiliated with easyCore team.
We will try our best to assist you with general questions and support, please use the appropriate category on meta.rampage.place, do not use this comment section.
Credits
@vq9o Project Leader
@verbxtim Software Engineer
@teamraxy Software Engineer
Required Dependicies
Modified Dependicies
Do not add these as we modified them and provide a version in release builds