easyCore FiveM Framework API Information

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

@Jake 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

Contributing to easyCore.

Thank you for being interested in contributing to easyCore project.

Code Of Conduct

  • Refrain from using languages other than English.
  • Refrain from discussing any politically charged or inflammatory topics.
  • Uphold mature conversations and respect each other; excessive profanity, hate speech, or any kind of harassment will not be tolerated.
  • No advertising.
  • Do not mention members of GitHub unless a question is directed at them and can’t be answered by anyone else.
  • Do not mention any of the development team for any reason. We will read things as we get to them.

Links

  • Discord: discord.gg/rampagecorp
  • Website: *soon, temp: easycore.rampage.place

Reporting Bugs

Notice: If an issue is closed and you experiencing the same issue, you are most likely doing something wrong, please request help instead.

Before posting make sure:

  • Clear & Understandable title
  • Descriptive description with images & error logs.
  • Explain what’s happening & reproduction steps.
  • If it’s a custom resource, please link to it. If you don’t want to share your private resource open a ticket at support.rampagestudios.org.

Please include:

  • easyCore Version
  • OS
  • Resource Count
  • is QB installed?
  • is ESX installed?
  • is any other framework installed?
  • fivem version
  • server version

Suggestions

Before posting makes sure:

  • Clear & Understandable title
  • Descriptive description
  • Make sure it doesn’t exist already!
  • Explain the Pros & Cons of this addition and/or removal.

Push Commit

We have a few guidelines, for contributors, you will get an exclusive ability to join the easyCore team, joining the team you will get easyCore team flair & badge on this forum. In order to join must meet requirements:

  • Actively assist in the development of easyCore
  • 20+ Commits
  • Dedicated
  • Respectful & work well with a team.

Upon joining the team you will have the authority to commit freely & audit other requests. As easyCore grows requirements will go higher.

You do not have to join easyCore team to contribute, simply make a pull and wait for it to be reviewed once you completed it.

Style Guidelines

Before you can push we have some requirements, make sure your commit message is:

  • Under 72 characters.
  • Start the commit message with specific emoji for the criteria:
    • :art: :art: when improving the format/structure of the code
    • :racehorse: :racehorse: when improving performance
    • :memo: :memo: when writing docs
    • :bug: :bug: when fixing a bug
    • :fire: :fire: when removing code or files
    • :white_check_mark: :white_check_mark: when adding tests
    • :lock: :lock: when dealing with security
    • :arrow_up: :arrow_up: when upgrading dependencies
    • :arrow_down: :arrow_down: when downgrading dependencies
    • :tshirt: :shirt: when removing linter warnings

Lua Styleguide

  • Use 4 Space indentation
  • Aim for lua 5.4 (include lua54 'yes' in the fxmanifest.lua)
  • Use PlayerPedId() instead of GetPlayerPed(-1)
  • Use #(vector3 - vector3) instead of GetDistanceBetweenCoords()
  • Don’t create unnecessary threads. always try to find a better method of triggering events
  • Don’t repeat yourself… if you’re using the same operations in many different places convert them into a function with flexible variables
  • For distance checking loops set longer waits if you’re outside of a range
  • Job specific loops should only run for players with that job, don’t waste cycles
  • When possible don’t trust the client, especially with transactions
  • Balance security and optimizations
  • Consider this Lua Performance guide
  • Use local variables everywhere possible
  • Make use of config options where it makes sense making features optional or customizable
  • Instead of table.insert(myTable, "Value") use myTable[#myTable + 1] = "Value"
  • Instead of table.insert(ages, "bob", 30) use ages["bob"] = 30

JavaScript Styleguide

  • Use 4 Space indentation
  • Don’t repeat yourself… if you’re using the same operations in many different places convert them into a function with flexible variables.

If you meet requirements, send a request to Easycore team - RAMPAGE.place

Kind Regards,
RAMPAGE Interactive
Parent company

1 Like

Project canceled/on hold.