Hello there
First of all, I want to say that I’m new to developing with lua, so sorry in advance if I don’t understand some concept…
I am trying to develop a /pm command to send a private message to a player, with the following syntax:
/pm playerSessionID message
I’m relying on 3Bot’s ChatBasics code.
The problem is that when I try to use the TriggerEvent(“redem: addCommand”), I get the following error:
SCRIPT ERROR: citizen:/scripting/lua/scheduler.lua:772: Cannot index a funcref
addCommand (@redem/server/sv_main.lua:140)
handler (@redem/server/sv_main.lua:160)
[global chunk] (@pm/server/main.lua:1)
In the following repository I leave you the code of the resource.
Thank you very much in advance,
Best regards