SpecT Posted February 28, 2015 Share Posted February 28, 2015 Hey guys! I want to ask you a question about the MTA commands (debugscript,aexec,...). Is it possible to add a restriciton - check player's serial (getPlayerSerial) and if its mine (for example) then it can be executed? Example: Im in my server and I want to turn my debugscript to 3 so i write /debugscript 3 and everything works fine. But if there is another admin and wants to turn his debugscript he wont be able cuz his serial isnt the one it has to be. I hope you understood me and if you didnt please ask, i will explain again. Thanks! Link to comment
Enargy, Posted February 28, 2015 Share Posted February 28, 2015 As fair I know, insert serial into a table and use getPlayerSerial and onPlayerCommand Link to comment
Banex Posted February 28, 2015 Share Posted February 28, 2015 addEventHandler("onPlayerCommand", root, function(command) if command == "debugscript" then if getPlayerSerial(source) ~= "yourserial" then cancelEvent() end end end) Link to comment
xeon17 Posted February 28, 2015 Share Posted February 28, 2015 You can change the acces to aexec and debugscript in acl.xml Link to comment
SpecT Posted March 1, 2015 Author Share Posted March 1, 2015 Owwwwwww ... I didn't know about that event (onPlayerCommand). Thanks guys! You can change the acces to aexec and debugscript in acl.xml Yes but for example I dont want another admins to access to the aexec or debugscript. Thanks anyway 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