The command is only available to players with the administrator role. The description inside the package says that to run, you need to call TriggerServerEvent
No I mean how to open this sheriff book, what is TriggerServerEvent? I’m admin of server, but what is TriggerServerEvent. Sorry I’m the new of FiveM/RedM server creator. Should I type TriggerServerEvent(‘sheriffbook’) or something on F8?
I’m still confusing about this, do you have any documents or videos for tutorial? I know the TriggerServerEvent, so which file should I open? client.lua? server.lua? I got Visual Studio Code installed, but I just don’t know which file should I open, and how to add TriggerServerEvent? Is that just simply find a empty blank to type TriggerServerEvent XXXX?
hello
Personally even with the TriggerServerEvent impossible to open the book if you are not an admin, I tried by registercommand or items nothing opens.
Yeah I know this, but it tells me “cmd access denied”, and I’m sure I just added me admin group in server.cfg. But it still like this, when I press F8, and type “sheriffbook” it tells me: script: sheriffbook command enter, and nothing happen, also no any error codes
RegisterCommand(‘sherifbook’, function(source, args, rawCommand)
local _source = source
local Character = VorpCore.getUser(_source).getUsedCharacter
local job = Character.job
if job == ‘Police’ or job == ‘sherif’ then
TriggerServerEvent(‘sheriffBook:server:open’)
end
end)
I tried with this function, is another one with an item that doesn’t work