Jump to content

shrike

Members
  • Posts

    12
  • Joined

  • Last visited

shrike's Achievements

Square

Square (6/54)

0

Reputation

  1. I think it works well as is. The script has been downloaded by a number of people and as the only feedback has been from Noddy so far, I guess they like it the way it is too. Or they're too lazy to comment or complain. I've posted a few screenshots on the resource page: https://community.multitheftauto.com/index.php?p= ... ls&id=4236
  2. Noddy, I'll see if I can create and upload some shots. As this is the first script I've uploaded, I'm working out the process as I go. eAi, I don't know that it has to be admin only. It runs server side and I imagined it would be used as part of a flooded world scenario and would be run by the admin(s) only as part of the environment. I suppose if it were re-written to run client side instead individual users could run it as they wish. It's only been tested on a private server with 1 or 2 users. I might make changes/additions based on enough feedback from people using it, or others might modify the script to suit their own purpose.
  3. Version 1.1 uploaded The GUI layout has been re-ordered.
  4. Thanks, Noddy for the positive comment and to DNL291 for adding the link to the resource. I meant to do that when I uploaded the script but forgot. I hope some people will provide feedback on how it runs, especially on a server with multiple players. I have no way to test the script under load and I'm curious as to the impact on a busy server since the functions all run server-side.
  5. waterFunc WaterFunc is a simple script to control the water level in MTASA. It's available on the community Resources page. The script is configured to be restricted to the admin group. You can change this if you wish, but several people trying to run the functions at the same time won't work. Make the following changes to acl.xml (server cannot be runnning) Add the following line to the admin group: Add the following line to the admin access control list: When the script is running, press the F6 key to access the gui menu. You can then: Set the water level (plus or minus) for the whole map. Surge (raise) the water level by n. Ebb (lower) the water level by n. Set a tide cycle. The water level is cycled up and down by the value specified. Setting the value to 0 will stop the tide function when the water level returns to the starting point of the cycle. Set a wave height value. I find the water movement looks more realistic with this turned on. 5 different water speeds. The "x5" speed makes the water movement a bit twitchy. Echo to Screen creates a small window under the radar displaying the water level. You can then close the main gui window while a function is running. Reset water level. Kills the current water level function and restores all vars to default settings. Using the Flood, Surge, Ebb and Tide functions, a water element is created automatically for water levels greater than 0 and destroyed for water levels less than 0. I'll be the first to acknowledge that the script is not well written and could be improved. Everything seem to work well enough, but if there's a problem the reset button should correct any water function problems. If not, re-start the script. Feel free to use this code as you wish. I studied many other scripts while learning to code in LUA, and have borrowed coding styles and naming conventions. (thanks, Remp, for the tidy coding style in your snow script and for one of the best GUI's I've seen) This has only been tested on a small server with a couple of players. I have no idea how well it will work in a many player, multi script environment. I'm open to suggestions and problem reports but I can't promise the script will be maintained/updated regularly. I may add other features to the script at a later date.
  6. diegofkda, I agree spreading the players around the map works better in a typical deathmatch scenario. Zango, I may want to use the spawnpoints later so I think I'll try changing the random spawn function in the script instead. It just seemed odd that after so many versions had been released the spawn behaviour changed. I thought it was a bug or something I'd mucked up. Thanks to both of you for the feedback.
  7. When running freeroam/play In previous versions the spawnpoint was always Tierra Robada. Now when you spawn the spawnpoint is random. While looking through the forums I saw a suggestion to edit broph.lua to fix this. Is that the correct way to sort this out or is there a fix to return to the previous versions use of the fixed Tierra Robada spawnpoint? Thanks
  8. Your ACL file is messed up. Assuming that you want to start with a fresh server, I'd suggest the following: - uninstall your server - rename the folder it was installed in to something like "mtaserver.save" or delete the folder if theres nothing you need to save. I don't believe an reinstall will overwrite the ACL.XML file. Don't start the server. Go to the following link and follow the instructions for adding your account and making yourself an administrator. https://wiki.multitheftauto.com/wiki/Ser ... nistrators Save the changes in the files accounts.xml and acl.xml. Don't change anything else for now. Start your server, log in and try the admin panel again. If I haven't missed anything that should solve your problem. The link I included is just one tiny part of the MTASA knowledgebase. If you want to understand how this all works, plan to spend a lot of time reading there. I've been playing with a server for months, and I still keep the wiki page open when I'm coding or testing things. It gets a little easier in time lol.
  9. My thanks to all of you, and in particular to eAi and Gamesnert for the detailed answers. Most of what I've coded clientside is for a GUI menu. The menu options trigger server events, but I've used "hasObjectPermissionTo" checking that defaults to false in most of the server functions, denied access where necessary in the default group and created a separate acl group for access. The exception would be a few water routines, including a "tides" function. They are currently in a client script because I thought they might run more smoothly, but I think I'll move them back to the server for better sync. I just hope it doesn't cause the server to lag. Is there a tool similar to the "netgraph" in CSS that would allow for server performance monitoring?
  10. I’ve been script testing on both the client and server sides and I’m looking for some input on how to select which side is the better choice. Obviously, some types of scripting have to be done on one side or the other, but I’m talking about situations where a choice exists. I believe that scripting serverside would provide better sync for players, minimize client script downloads, and would, if needed, protect the contents of the script. The price for this would be increased traffic between the server and each of the clients. On the other hand, scripting client side should provide better response for the player as the script is running locally for each client. However, I don’t believe that these client scripts would execute at the same time, and that would mess up the shared view of the server world events. Can anyone tell me if what I’ve said above is correct? Suggestions on how to decide which way is better would also be very helpful. Thanks
  11. Thanks for replying so quickly and for answering all of my questions, Mr.Hankey. I looked throught the function lists several times but somehow missed the "isGuestAccount" option. I'll add the check and try it out. I am going with the custom list. It should shrink the acl substantially and will make acl management much simpler. Writing most of the code was more of a lua learning exercise. Now comes the tough part, coming up with a idea for a gamemode. After seeing what some of the other forum users have come up with, I'll have to get much better at lua as well. Again, your help is much appreciated.
  12. Hello I have been learning to code in lua for the past few months. I have read through most of the server and scripting posts and have found lots of help in solving scripting problems. However, I recently ran into a problem accessing certain functions, like kickPlayer. I have modified the admin acl, adding permissions for each function, and I am a member of the admin group. My script is admin use only, and most functions are wrapped in “hasObjectPermissionTo” if statements, which default to false if the permission is not explicitly granted. Although I can kick from the server control panel and the chatwindow, whenever I tried to access function.kickPlayer, I would get an “access denied” error from the server. In a recent post someone suggested adding the script resource into the admin group, which would grant the script permission to use kickPlayer and other functions. It worked but I have a few questions: 1. Is adding my script to the admin group a secure and appropriate way to resolve the problem, or is there a better way? 2. Is it a good idea to add a large collection of permissions to the admin group, or should I move all these permissions to a custom list instead? 3. As well as granting these permissions in the admin group, I’ve denied them in all other acl’s. Is setting these functions to false in the other acl’s unnecessary overkill? 4. I use a gui to control the script and while testing noticed that I could access the gui before logging into the server. I’d like the gui to be inaccessible until I’m logged in, as the admin panel is but I can’t figure out how to do this. Any suggestions? If anyone can suggest where I can find a comprehensive write up on acl’s that would be great. It would be even better if it’s MTASA specific. Thanks and any help with the above would be appreciated.
×
×
  • Create New...