Sora Posted January 26, 2013 Share Posted January 26, 2013 hey ^^ i'm thinking of acl events like onAclModifyObject onAclGroupAddObject onAclGroupRemoveObject onAclGroupAddAcl onAclGroupRemoveAcl onAclCreateGroup onAclDestroyGroup onAclCreate onAclDestroy onAclSetRight events like this would be really useful , don't you agree with me ? with those events i can know every annoying thing and can handle it easily ^.^ Link to comment
MR.S3D Posted January 26, 2013 Share Posted January 26, 2013 hey ^^i'm thinking of acl events like onAclModifyObject onAclGroupAddObject onAclGroupRemoveObject onAclGroupAddAcl onAclGroupRemoveAcl onAclCreateGroup onAclDestroyGroup onAclCreate onAclDestroy onAclSetRight events like this would be really useful , don't you agree with me ? with those events i can know every annoying thing and can handle it easily ^.^ +1 Link to comment
iPrestege Posted January 27, 2013 Share Posted January 27, 2013 I'm with you on this suggestion because it is useful sometimes . Link to comment
Sora Posted January 27, 2013 Author Share Posted January 27, 2013 thanks , those events would be really useful Link to comment
Quited Posted January 28, 2013 Share Posted January 28, 2013 Hahahaha , if this events enable you make you mod give permisstion 1.5 (added acl edit and set right) Link to comment
eAi Posted January 28, 2013 Share Posted January 28, 2013 What would these be useful for (except for admin tools?) Link to comment
iPrestege Posted January 28, 2013 Share Posted January 28, 2013 What would these be useful for (except for admin tools?) That will be useful in : For Example SoRa Create Give Permissions Panel If events have been added will develop the script is very useful ^^ For AclModifyObject , AddObject , SetRight . Link : https://forum.multitheftauto.com/viewtopic.php?f=108&t=52663 I hope you understand what I mean and I hope add events ^ ^ Thank you for your interest ^ ^ Link to comment
Anderl Posted January 28, 2013 Share Posted January 28, 2013 Even a Google Translator's translated text would be easier to understand than your english. I didn't understand almost nothing. Link to comment
Sora Posted January 28, 2013 Author Share Posted January 28, 2013 eAi , you're right i wanted this for admin tools for server's security this will help me to protect my own server w1w#ALBANDER, how funny you're , i can make my new version of this script without those events , i just can use wiki functions which are already exist .. thanks everybody for voting , i hope those events will be added Link to comment
Quited Posted January 28, 2013 Share Posted January 28, 2013 If you Can , make it Now ! , Link to comment
Sora Posted January 28, 2013 Author Share Posted January 28, 2013 (edited) If you Can , make it Now ! , i make it whenever i want to .. , your reply isn't belong to here so stop bothering me :\ Edited January 28, 2013 by Guest Link to comment
iPrestege Posted January 28, 2013 Share Posted January 28, 2013 If you Can , make it Now ! , We are talking seriously not playing I hope that you know what I mean! Link to comment
MSHOOSH Posted January 29, 2013 Share Posted January 29, 2013 Nice idea sora I hope to succeed < ^ w1w#ALBANDER Do you think you are so funny ? , (you are in a deplorable state), Link to comment
myonlake Posted January 29, 2013 Share Posted January 29, 2013 These events are not useful, since you can make your own event or function doing whatever you want. I don't think these events would be used in much of scripts at all. Link to comment
iPrestege Posted January 29, 2013 Share Posted January 29, 2013 !! But some people need these events and I think it is better to add events!Thank you! Link to comment
Sora Posted January 29, 2013 Author Share Posted January 29, 2013 MTA team is going to release the new version anyways .. it's depends on votes and of course on mta team opinion Link to comment
Anderl Posted January 29, 2013 Share Posted January 29, 2013 As said above, you can already make that. As long as ACL is modified using functions implemented in LUA, you can use make wrappers of the functions to call events. Link to comment
Sora Posted January 29, 2013 Author Share Posted January 29, 2013 do you mean something like this? : addEvent("onAclGroupAddObject") addEventHandler("onAclGroupAddObject",root, function (str1,str2) if str1 and str2 then aclGroupAddObject(aclGetGroup(tostring(str1)),tostring(str2)) return true else return false end end) addCommandHandler("acladdobject", function (player,cmd,group,object) if group and object then triggerEvent("onAclGroupAddObject",player,group,object) outputChatBox("* Object "..object.." successfully added to "..group.." ",player,0,255,0) else outputChatBox("* Syntax Error , type /acladdobject ",player,255,0,0) outputChatBox("* Object name can be user.example or resource.example ",player,255,255,0) end end) still if someone used the function aclGroupAddObject , he'll never trigger this event .. and even if i've overwrite the function it will never be global so will never be handled .. that's why i've requested those events to be added Link to comment
Anderl Posted January 29, 2013 Share Posted January 29, 2013 That's not what I meant. __aclGroupAddObject = aclGroupAddObject; function aclGroupAddObject ( ... ) if ( __aclGroupAddObject ( ... ) ) then triggerEvent ( "onACLGroupObjectAdd", root, ... ); return true end return false end Just make a resource for things you will use in multiple other resources and export them. Link to comment
Sora Posted January 30, 2013 Author Share Posted January 30, 2013 i didn't meant this .. look for example , if someone tried to use the function aclGroupAddObject it will never tirgger the event above ^ he must use somethng like exports.resourcename: aclGroupAddObject(...) the event would be global if it was defined by mta so i can use something like addEventHandler("onAclGroupAddObject",root, function () if something() then cancelEvent() end end) or something like addEventHandler("onAclGroupAddObject",root, function (group,object) outputServerLog("Object "..obejct.." added to "..group.." by "..getPlayerName(source) or getResourceName(source).." ") end) Link to comment
myonlake Posted January 30, 2013 Share Posted January 30, 2013 i didn't meant this .. look for example , if someone tried to use the function aclGroupAddObject it will never tirgger the event above ^ he must use somethng like exports.resourcename: aclGroupAddObject(...) the event would be global if it was defined by mta so i can use something like addEventHandler("onAclGroupAddObject",root, function () if something() then cancelEvent() end end) or something like addEventHandler("onAclGroupAddObject",root, function (group,object) outputServerLog("Object "..obejct.." added to "..group.." by "..getPlayerName(source) or getResourceName(source).." ") end) MTA Team doesn't have to make it an event. You only use wrappers for such, just like Anderl showed. It works perfectly. Link to comment
Sora Posted January 30, 2013 Author Share Posted January 30, 2013 The problem is what anderl showed, isn't global it need to be exported i wanted these or those events to do like what i said above ^ thanks anderl and myonlake and everybody for voting .. let us just see what is mta team opinion Link to comment
myonlake Posted January 30, 2013 Share Posted January 30, 2013 I am not trying to block the team to not add this feature, but it can be very easily obtained by wrappers. Does it have to be global? What's so wrong about exported functions? Almost all professional scripts use exported functions. Link to comment
Anderl Posted January 30, 2013 Share Posted January 30, 2013 Yeah, you can do wrappers for the functions so that they call events (basically, this is what myonlake said). Link to comment
Recommended Posts