Jump to content

DockDadDan

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by DockDadDan

  1. You might use something like this server side: function goPeaceMode(plr) if (not hasObjectPermissionTo(plr, "command.passive", false)) then -- You can use whatever action you want instead of 'command.passive' return false end triggerClientEvent(plr, "peaceMode.toggle", resourceRoot) end addCommandHandler("passive", goPeaceMode) And client side: function goPeaceMode() guiSetVisible(GUIEditor.window[1], true) showCursor(true) end addEvent("peaceMode.toggle", true) addEventHandler("peaceMode.toggle", resourceRoot, goPeaceMode)
  2. addEventHandler("onServerPlayerLogin", root, function() local name = exports.serverCore:getPlayerAccountName(source) if (users[name]) then setElementData(source,"premium", users[name], true) end end) I assume you put this piece of code in another .lua file while you defined 'users' as a local variable which means it wouldn't be accessible in any other .lua file except the file it was defined in. If I guessed it right, you'd have to remove that 'local' beside users variable.
×
×
  • Create New...