Firespider Posted August 20, 2022 Posted August 20, 2022 I don't know what the problem is with the script addEventHandler ("onPlayerCommand", getRootElement(), function (cmd ) local serial = getPlayerSerial ( source ) if not (devSerials[serial] ) then if (devCommands[cmd]) then outputChatBox (exports.fv_engine:getServerSyntax("Admin","red").."Ezt a parancsot nem használhatod!",source,255,255,255,true); cancelEvent(); end end if devSerials[serial] then if (devCommands[cmd]) then sendMessageToAdmin(source, hexColor..getAdminName(source)..white.." használta a(z) "..hexColor..cmd..white.." parancsot!", 5); exports['fv_logs']:createLog(cmd, getAdminName(source).." használta a(z) " ..cmd.." parancsot!",source); end end end); https://cdn.discordapp.com/attachments/582126900915208214/1010475645278638110/unknown.png
Tails Posted August 21, 2022 Posted August 21, 2022 Make sure you have exported the function createLog in the fv_logs resource meta.
Firespider Posted August 21, 2022 Author Posted August 21, 2022 Shall we review the meta? Anyway, here's the meta if that helps. <meta> <script src="global.lua" type="shared" /> <script src="client.lua" type="client" /> <script src="statsC.lua" type="client" /> <script src="server.lua" type="server" /> <script src="adminhelpC.lua" type="client" /> <script src="adminjail/client.lua" type="client" /> <script src="adminjail/server.lua" type="server" /> <export type="shared" function="getAdminTitle"/> <export type="shared" function="getAdminColor"/> <export type="shared" function="getAdminName"/> <export type="shared" function="getAdminDuty"/> <export type="shared" function="getAdminSyntax"/> <export type="server" function="sendMessageToAdmin"/> <export type="server" function="adminJailTimer"/> <export type="shared" function="addAdminCommand"/> <oop>true</oop> </meta>
Tails Posted August 21, 2022 Posted August 21, 2022 Is that the fv_logs resource? Make sure to add this line: <export type="server" function="createLog"/>
Firespider Posted August 21, 2022 Author Posted August 21, 2022 Doesn't working But what you wrote should be good, I can't believe it Can you help me with this?
Mkl Posted August 21, 2022 Posted August 21, 2022 It coule be a shared type function, try with type="shared".
Firespider Posted August 21, 2022 Author Posted August 21, 2022 (edited) It says so Edited August 21, 2022 by Firespider
Firespider Posted August 21, 2022 Author Posted August 21, 2022 I just don't understand what's wrong.
Tails Posted August 21, 2022 Posted August 21, 2022 Make sure that resource with the log function is started, preferably before the other resource.
Firespider Posted August 22, 2022 Author Posted August 22, 2022 I don't know why you want the log resource to start sooner, but I don't know how ACL starts it
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now