'LinKin Posted April 10, 2014 Posted April 10, 2014 Hello, I've this on meta: <setting name="@displayWinnerMessages" friendlyname="Show the winner of the match" value="true" accept="true,false" desc="Displays the final winner of the match in the chat." /> and serverside I have this local showFinalWinner = get("displayWinnerMessages") addEvent ("onSettingChange") addEventHandler("onSettingChange", resourceRoot, function(theSetting, oldValue, newValue, thePlayer) if theSetting == "displayWinnerMessages" then outputChatBox(theSetting.." has been changed to "..newValue, thePlayer) end end) But when I go to Admin Panel>myResource>Settings I don't see any setting to change there.. It's empty EDIT: When I use * before the setting's name. It works. But isn't it supposed that it must work with @ too? So that only that resource can modify it Need a clanwar script? Click here! Do you want some free scripts for your DD server? Visit my website.
Baseplate Posted April 10, 2014 Posted April 10, 2014 Access modifiers:*: public and can be read and written by any resource. #: protected and can be read by any resource but only written by the resource they belong to. @: private and can only be read and written to by the resource they belong to. None specified: private if it is a local setting, public if it's a global setting. https://wiki.multitheftauto.com/wiki/Settings_system
Moderators IIYAMA Posted April 10, 2014 Moderators Posted April 10, 2014 EDIT: When I use * before the setting's name. It works. But isn't it supposed that it must work with @ too? So that only that resource can modify it Exactly, >> only that resource can edit it <<, but that isn't admin isn't it? Only the script it self can edit the setting. By using: https://wiki.multitheftauto.com/wiki/Set Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
'LinKin Posted April 10, 2014 Author Posted April 10, 2014 Ah. thanks for clearing the doubt IIYAMA Need a clanwar script? Click here! Do you want some free scripts for your DD server? Visit my website.
Moderators IIYAMA Posted April 11, 2014 Moderators Posted April 11, 2014 np. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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