'LinKin Posted April 10, 2014 Share 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 Link to comment
Baseplate Posted April 10, 2014 Share 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 Link to comment
Moderators IIYAMA Posted April 10, 2014 Moderators Share 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 Link to comment
'LinKin Posted April 10, 2014 Author Share Posted April 10, 2014 Ah. thanks for clearing the doubt IIYAMA Link to comment
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