[Release] FiveM-Core V1

Welcome to the FiveM-Core,


This is a basic core mode for easy development and management of a normal server. Access to various commands and easy guides on how to make usage of them. Currently in the works.

Features of FiveM_Core
Easy creation of commands and events for easy development.
Easy use of commands and events.
A group system based on a password.
Chat Proximately.

Modular Assets
Accessible scripts converted or made for FiveM Core will be directly linkable from this thread Into Github. Please Make sure you read the installation manual and update your main.lua file.

  • Adverts - In Progress
  • Welcome Message - In Progress
  • SMS System - In Progress


Support Tutorial (Basic Text Command)
If you’re looking to create a basic text command either for the client or the player you can follow this easy tutorial. Firstly, create a Lua file preferably named after the command in fivem_core/cmds and add the command to your main.lua following the code below.

Cmd’s Accessible by default:
TriggerCmd = Client
TriggerAdminCmd = Admin
TriggerCopCmd = Cop

  elseif cmd == "/commandname" then
  TriggerCmd("commandname", p, args)

next, add your command file to fivem_core/ _resouces as server script and proceed to the commandname.Lua file with an editor program.

Creation of the Script
In this tutorial we will create a 911 message displayed if a user(s) inputs /911 in the chat system.

-----------------
--FIVEM Script --
-----------------
RegisterServerEvent("CGC:command")

AddEventHandler("CGC:command", function(p, args)
  if args[1] ~= nil then
  reason = joinArgs(args)
  sendMessage(-1, prefix_info .. GetPlayerName(p) .. orange .. "" .. reason)
  else
  sendMessage(source, prefix_error .. "Please state what u want")
  end
end)

Explanation:
This essentially means that if /command is inputted into the chat system it has to have a one argument. If the user(s) inputs /command without a second message it will show the error message however, if the user(s) does /command test it will show [INFO] Playername test.

Types of Messages:
if you want to create a client message use source, . If you want to have a messaged displayed to everyone use -1,.

Custom Message:
You can also customize the script to input a set message. this can be done by doing " message " within the message you want it to display in . For this example to display Has Called 911 for:.

-----------------
--FIVEM Script --
-----------------
RegisterServerEvent("CGC:911")

AddEventHandler("CGC:911", function(p, args)
  if args[1] ~= nil then
  reason = joinArgs(args)
  sendMessage(-1, prefix_info .. GetPlayerName(p) .. orange .. "has called 9111 for:" .. reason)
  else
  sendMessage(source, prefix_error .. "Please state reason.")
  end
end)


Colour Formatting
Below is a list of colours used by FiveM.

^1 = Red
^2 = Green
^3 = Orange
^4 = Blue
^5 = Light Blue
^6 = Purple
^7 = White

~r~ = Red
~b~ = Blue
~g~ = Green
~y~ = Yellow
~p~ = Purple
~c~ = Grey
~m~ = Dark Grey
~u~ = Black
~o~ = Orange

Special:
~n~ = New line
~s~ = Reset Color
~h~ = Bold text

For notification:
∑ = Rockstar Icon
÷ = Rockstar Icon
¦ = Rockstar Verified Icon


Download FiveM_Core
Link to access FiveM_Core currently hidden.
V0.1 FIVEM_Core

4 Likes

Reserved for future posts.

2 Likes

Good release, Amazing ! :slight_smile:

Oh! nice i like it !

1 Like

As there’s no link I’m moving this to the discussion section :corn:

1 Like

V0.1 Uploaded. Hasn’t been tested.

https://gyazo.com/5ba62c5c7d4303252a6211e25fa56187
any clue?

1 Like

not work “error” for me

1 Like

@Joe_Cooper Do you’ve Essentials ?

@Dom102 Elaborate what issue you’ve?

yes i have them and they are working

Great Release like using this to make server

keep saying error on mine idk im trying to fix it and it doesnt want to work

what is there error you get because im getting one about stuff not being greenlit

Currently investigating and will update the link.

ranger here is the error people are getting i was testing your script

Well, how to reset bold?

Have you tried ~s~ (e.g. "~h~BOLD~s~Not bold")?

1 Like

does the script work for you