New to coding, and trying to learn. Now I have several issues and I’m hoping someone could assist me.

I installed the FXServer as per all the tutorials, and my localhost server runs fine. I attempted to create my first script as per the guide on (https://docs.fivem.net/scripting-manual/introduction/creating-your-first-script/) and it says “Couldn’t load resource mymode. :(” when i attempt to join the server. I have also tried to install vrp and esx to which I did, but when I join the server, all the scripts run without an issue but keybindings like K doesn’t really do anything. And sometimes It does bring up the menu but its very delayed the menu options don’t work.

If anyone has any idea on what I could be doing wrong and could help it would be great!

It would really help if for your first script you would share all your files. Just paste the code (including __resource.lua) here as a code block

Sure, sorry I just pasted pretty much what the link I posted up there gave me. let me know if any other info is helpful?

# You probably don't want to change these!
# Only change them if you're using a server with multiple network interfaces.
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"

set es_enableCustomData 1
set mysql_connection_string "server=127.0.0.1;database=essentialmode;userid=root;password=****"

# These resources will start by default.
start mapmanager
start chat
start spawnmanager
start sessionmanager
start fivem
start hardcap
start rconlog
start scoreboard
start playernames

# Starting Essentialmode/MySQL-Async
#start mysql-async
#tart essentialmode
#start esplugin_mysql
#start es_admin2

# Startings my Scripts
start EasyAdmin
start NativeUI

restart sessionmanager

# This allows players to use scripthook based plugins such as lambda menu.
# Set this to 0 to disallow scripthook.
sv_scriptHookAllowed 0

# Uncomment this to enable RCON. Make sure to change the password.
rcon_password ollie

# A comma-separated list of tags for your server.
# For example:
# - sets tags "drifting, cars, racing"
# Or:
# - sets tags "roleplay, military, tanks"
sets tags "default"

# Set an optional server info and connecting banner image url.
# Size doesn't matter, any banner sized image will be fine.
#sets banner_detail "http://url.to/image.png"
#sets banner_connecting "http://url.to/image.png"

# Set your server's hostname
sv_hostname "Dev Test!"

# Nested configs!
#exec server_internal.cfg

# Loading a server icon (96x96 PNG file)
#load_server_icon myLogo.png

# convars which can be used in scripts
set temp_convar "hey world!"

# Uncomment this line if you do not want your server to be listed in the server browser.
#sv_master1 ""

# Want to only allow players authenticated with a third-party provider like Steam?
# Don't forget Social Club is a third party provider too!
#sv_authMaxVariance 1
#sv_authMinTrust 5

# Add system admins
add_ace group.admin command allow # allow all commands
add_ace group.admin command.quit deny # but don't allow quit
add_principal identifier.steam:110000101363ae4 group.admin # add the admin to the group

# Hide player endpoints in external log output.
sv_endpointprivacy true

# Server player slot limit (must be between 1 and 32)
sv_maxclients 32

# License key for your server (https://keymaster.fivem.net)
sv_licenseKey snip

_resource.lua

resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'

resource_type 'gametype' { name = 'My awesome game type!' }

client_script 'mymode_client.lua'

mymode_client.lua

-- define a local variable called `spawnPos` with a coordinate somewhere on the map
-- Lua in FiveM (through CfxLua) supports first-class vectors, which in this case can be accessed using .x, .y and .z.
local spawnPos = vector3(686.245, 577.950, 130.461)

-- add an event handler for the (local) event called 'onClientGameTypeStart'.
-- it takes no arguments in this case (in Lua you can omit arguments), since our resource is a game type and you can only run one at once,
-- that means this will basically run when we start ourselves on the client. nice!
AddEventHandler('onClientGameTypeStart', function()
    -- set an automatic spawn callback for the spawn manager.
    -- normally, this works using hardcoded spawn points, but since this is a scripting tutorial, we'll do it this way.
    --
    -- the spawn manager will call this when the player is dead, or when forceRespawn is called.
    exports.spawnmanager:setAutoSpawnCallback(function()
        -- spawnmanager has said we should spawn, let's spawn!
        exports.spawnmanager:spawnPlayer({
            -- this argument is basically a table containing the spawn location...
            x = spawnPos.x,
            y = spawnPos.y,
            z = spawnPos.z,
            -- ... and the model to spawn as.
            model = 'a_m_m_skater_01'
        }, function()
            -- a callback to be called once the player is spawned in and the game is visible
            -- in this case, we just send a message to the local chat box.
            TriggerEvent('chat:addMessage', {
                args = { 'Welcome to the party!~' }
            })
        end)
    end)

    -- enable auto-spawn
    exports.spawnmanager:setAutoSpawn(true)

    -- and force respawn when the game type starts
    exports.spawnmanager:forceRespawn()
end)

more screenshots

You need to start mymode in the server.cfg before you start your server

Sorry, when I took the Screenshots I had taken it off the server.cfg so I could join the server. It is back on there now and it is still not working. The other issue I have is, as you can see I have EasyAdmin installed. When I hit the F2 key no options or menu pop up.

Here is the updated server.cfg code

# You probably don't want to change these!
# Only change them if you're using a server with multiple network interfaces.
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"

set es_enableCustomData 1
set mysql_connection_string "server=127.0.0.1;database=essentialmode;userid=root;password=****"

# These resources will start by default.
start mapmanager
start chat
start spawnmanager
start sessionmanager
start fivem
start hardcap
start ■■■■■■■
start scoreboard
start playernames

# Starting Essentialmode/MySQL-Async
#start mysql-async
#tart essentialmode
#start esplugin_mysql
#start es_admin2

# Startings my Scripts
start EasyAdmin
start NativeUI
start mymode

restart sessionmanager

# This allows players to use scripthook based plugins such as lambda menu.
# Set this to 0 to disallow scripthook.
sv_scriptHookAllowed 0

# Uncomment this to enable RCON. Make sure to change the password.
rcon_password ****

# A comma-separated list of tags for your server.
# For example:
# - sets tags "drifting, cars, racing"
# Or:
# - sets tags "roleplay, military, tanks"
sets tags "default"

# Set an optional server info and connecting banner image url.
# Size doesn't matter, any banner sized image will be fine.
#sets banner_detail "http://url.to/image.png"
#sets banner_connecting "http://url.to/image.png"

# Set your server's hostname
sv_hostname "Dev Test!"

# Nested configs!
#exec server_internal.cfg

# Loading a server icon (96x96 PNG file)
#load_server_icon myLogo.png

# convars which can be used in scripts
set temp_convar "hey world!"

# Uncomment this line if you do not want your server to be listed in the server browser.
#sv_master1 ""

# Want to only allow players authenticated with a third-party provider like Steam?
# Don't forget Social Club is a third party provider too!
#sv_authMaxVariance 1
#sv_authMinTrust 5

# Add system admins
add_ace group.admin command allow # allow all commands
add_ace group.admin command.quit deny # but don't allow quit
add_principal identifier.steam:110000101363ae4 group.admin # add the admin to the group

# Hide player endpoints in external log output.
sv_endpointprivacy true

# Server player slot limit (must be between 1 and 32)
sv_maxclients 32

# License key for your server (https://keymaster.fivem.net)
sv_licenseKey mykey

found the issue “_resouce.lua” needed another underscore… “__resource.lua” worked like a charm. I am still having issues with my keys not working though. Does anyone know what the issue could be there?

I’ve installed various scripts and even ESX and vRP and my keys seem to not work well with the server. Am i doing something wrong?