github wiki
Lot of functions without any description, i will fixed that, i promise :)
implemention of most common function in better way (using ESX)
Dependency:
essentialmode
es_extended
For using job creation, inventories etc
esx_addoninventory
esx_addonaccount
esx_datastore
esx_society
TODO:
fraction with society creation
easy storage system
permission system
extended items usage
CLIENT:
Functions:
ESX section
getEsxInstance(): ESX
Blip section
createBlip(name, blip, coords, options): Blip
getBlips(): Blip[]
getBlip(instance): ?Blip
removeBlip(instance): void
Marker section
createMarker(type, coords, cb, options): void
createDistanceMarker(type, coords, distance,cb, options): void
getMarkers(): Marker[]
removeMarker(id): void
removeDistanceMarker(id): void
updateMarker(id, type, coords, options): void
updateDistanceMarker(id, type, coords, distance, options): void
3D texts section
createText(text, coords, options)
createDistanceText(text, coords, distance, options)
updateText(id, text, coords, options)
updateDistanceText(id, text, coords, distance, options)
getTexts()
getDistanceTexts()
Common section
getPlayerPos(): vector3(x,y,z)
sendChatMessage(title, message, color): void
sendHelpNotification(text): void
showNotification(message, color, flashing, brief): void
getPlayers(filter)
getPlayerData(force: boolean): PlayerData
isPlayerLoaded(): boolean
getPlayer(): PlayerData
callCallback(name,cb,...)
Menu section
createMenu(title, name, elements, options): void
closeAllMenu()
closeMenu(name)
addElement(name, action)
getElement(name)
removeElement(name)
Font section
getFontId(): number
draw3DText(x, y, z, text): void
Jobs section
isAtJob(job): boolean
isAtJobGrade(job,grade): boolean
getPlayerJob(force: boolean): Job
SERVER:
Functions:
ESX section
getEsxServerInstance(): ESX
Command section
addAdminCmd(cmd, level, cb, help): void
addCmd(cmd, cb, help): void
Phone section
registerNumber(number, text): void
Society section
registerSociety(society, name, type): boolean|nil
Datastore section
getDatastore(name,cb)
getPlayerDatastore(identifier, name,cb)
createDatastore(name, shared,cb)
isDatastoreExists(name)
Addon account section
getAccount(owned,account,cb)
getSharedAccount(account,cb)
createAccount(account,shared,cb)
isAccountExists(name,cb)
Addon inventory section
getInventory(owned,inventory,cb)
getSharedInventory(inventory,cb)
createInventory(inventory,shared,cb)
isInventoryExists(inventory,cb)
Common section
registerCallback(cbName, callback): void
sendChatMessageFromServer(source,title,message,color): void
sendNotificationFromServer(source, message): void
Player section
getPlayerFromId(source,cb): void
Job section
addPlayerToJob(source, job, grade): void
isJobExists(job,cb): void
createJob(name,label,whitelisted): void
isJobGradeExists(name,job_name,cb): void
createJobGrade(job_name,grade,name,label,salary): void
Discord
sendDiscordMessage(name, message, color, footer)
Common:
mergeTables(sourceTable, targetTable): table
emptyTable(table): bool
isTable(table): bool
isFunction(func): bool
tableLength(table): number
tableLastIterator(table): number
Examples:
Getting players
Get players with filter, using ESX.Game.GetPlayers()
Creating blips
Default options for blips can be found at config
You can use blip variable or get blip by function with our function and use native function like category
Creating markers
== BIG UPDATE ==
In new version we create markers only once, rcore is creating every native that need to run every tick inside own client side script, which is used for better optimalization, you can use onEnter, onLeave like before, because this is called every tick.
New update also containing options to show markers only to some jobs or grades in jobs You can use options jobs = {}
and grades = {}
So if you want to create marker only for job police you can do it like this
jobs = {'police'}
And if it be only for boss of police you can do this
jobs = {'police'}, grades = {'boss'}
Distance marker is used to create marker only be visible at some distance 3 parameter of this function is distance to see
Server
Register number & society
Add help command
Register datastore and get / set data
Discord sending
Predefined Colors:
Use at your scripts
LUA
C#
Tips
Use export as global variable, its simple and you can use short version of calling rcore
Last updated
Was this helpful?