snatvb Posted January 18, 2017 Share Posted January 18, 2017 Hello, I don't know, server have file watcher? If no, why developers don't add it? If yes, you can say me, are where it? Thanks! Link to comment
LoPollo Posted January 18, 2017 Share Posted January 18, 2017 (edited) 43 minutes ago, snatvb said: file watcher What do you mean? if you mean functions to access files, then they do exist: they are the file functions Edit: do you mean something like https://msdn.microsoft.com/it-it/library/system.io.filesystemwatcher(v=vs.110).aspx? So an event that get riggered when a file/directory gets an edit? Edited January 18, 2017 by LoPollo 1 Link to comment
snatvb Posted January 18, 2017 Author Share Posted January 18, 2017 (edited) 23 minutes ago, LoPollo said: What do you mean? if you mean functions to access files, then they do exist: they are the file functions Edit: do you mean something like https://msdn.microsoft.com/it-it/library/system.io.filesystemwatcher(v=vs.110).aspx? So an event that get riggered when a file/directory gets an edit? yes! i mean second, like frontend, when i edit file, then webpack compile all files in ome file, or like nodejs, etc so, i can use something like? example: I have resource "hud", I edit file in the dir ("hud/client.lua") -> Server update resource (like command "restart hud") Edited January 18, 2017 by snatvb Link to comment
LoPollo Posted January 18, 2017 Share Posted January 18, 2017 I'm sorry, but i don't think there's anything like that. Also note that restarting a resource like you said 11 minutes ago, snatvb said: Server update resource (like command "restart hud") will cause (obviously) the resource stop, and what about if the resource was doing something??? think about a "mission" resource, a player is in that mission and then.... the resource get restarted. No more mission... it's sad I think that having to do it manually is the best option available. Remember also that there are other ways to restart a resource other than from the server console: using the commands from an admin account, like /refresh and /restart someResource or with other resources like the admin panel 1 Link to comment
snatvb Posted January 18, 2017 Author Share Posted January 18, 2017 1 minute ago, LoPollo said: I'm sorry, but i don't think there's anything like that. Also note that restarting a resource like you said will cause (obviously) the resource stop, and what about if the resource was doing something??? think about a "mission" resource, a player is in that mission and then.... the resource get restarted. No more mission... it's sad I think that having to do it manually is the best option available. Remember also that there are other ways to restart a resource other than from the server console: using the commands from an admin account, like /refresh and /restart someResource or with other resources like the admin panel "will cause (obviously) the resource stop, and what about if the resource was doing something??? think about a "mission" resource, a player is in that mission and then.... the resource get restarted. No more mission... it's sad " this need for develop, fast develop and comfort you don't know how i can contact with developers for resolve this problem? maybe with use third-party programs? Link to comment
LoPollo Posted January 18, 2017 Share Posted January 18, 2017 This is a feature request, so write the suggestion here to let it be discussed, and here for the actual request. 1 Link to comment
pa3ck Posted January 19, 2017 Share Posted January 19, 2017 "bind 1 cleardebug" "bind 1 restart my-resourcename" Takes you 1 key press. Also, I like to save my scripts as I go and most of the times the script is broken/not finished while I save it, it would be pointless to restart it, wouldn't it? You can probably develop this feature yourself within MTA boundaries. Link to comment
snatvb Posted January 19, 2017 Author Share Posted January 19, 2017 8 hours ago, pa3ck said: "bind 1 cleardebug" "bind 1 restart my-resourcename" Takes you 1 key press. Also, I like to save my scripts as I go and most of the times the script is broken/not finished while I save it, it would be pointless to restart it, wouldn't it? You can probably develop this feature yourself within MTA boundaries. no. it's bad idea, because will not be able to write "1" in console) maybe "ctrl+r" and something like) But i bad know C++ that write the function in server mta Link to comment
pa3ck Posted January 19, 2017 Share Posted January 19, 2017 Oh so you are using the server console to restart stuff? Well, whenever I script I'm on the server so that I can use binds, that's a different story. Link to comment
snatvb Posted January 19, 2017 Author Share Posted January 19, 2017 53 minutes ago, pa3ck said: Oh so you are using the server console to restart stuff? Well, whenever I script I'm on the server so that I can use binds, that's a different story. really? how you do it? Link to comment
pa3ck Posted January 19, 2017 Share Posted January 19, 2017 Are you in the Admin ACL group? If not, open acl.xml and search for the group admin, then add your username like this: <object name="user.USERNAME"></object> If you don't have a user account registered on your server yet, create one with /register [on the server] or use 'addaccount' command in the server console. Alternatively, you can also use MTA functions to put yourself in the admin group with aclGroupAddObject and this way you don't have to restart the server. Once you added your account to the ACL group, all you have to do is login and you will be able to use commands like: /restart /refresh /stop /start etc... Then you will be able to bind commands like "/restart resource" 1 Link to comment
snatvb Posted January 19, 2017 Author Share Posted January 19, 2017 2 hours ago, pa3ck said: Are you in the Admin ACL group? If not, open acl.xml and search for the group admin, then add your username like this: <object name="user.USERNAME"></object> If you don't have a user account registered on your server yet, create one with /register [on the server] or use 'addaccount' command in the server console. Alternatively, you can also use MTA functions to put yourself in the admin group with aclGroupAddObject and this way you don't have to restart the server. Once you added your account to the ACL group, all you have to do is login and you will be able to use commands like: /restart /refresh /stop /start etc... Then you will be able to bind commands like "/restart resource" oh, maaan, very-very thanks, u so help me! 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