Jump to content

Mr_Moose

Members
  • Posts

    866
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Mr_Moose

  1. That function expected a number but you added a boolean instead, just change it to a number. Are you btw allowed to use WSS police system?
  2. getPlayerTeam(hitPlayer) Returns a team element and "Criminal" is a string, so you can't compare them that way. You have to convert the string into a team or the team into a string, I would recommend the first option to avoid errors in case a player doesn't have a team at all. if getPlayerTeam(hitPlayer) == getTeamFromName("Criminal") then And that's all you need.
  3. Well you could theoretically setup 10 virtual machines on a really powerful hyper-v server, and write some macro scripts that make your "bots" act like real players. But in all seriousness, it's easier to find real players
  4. Mr_Moose

    How?

    Sure, you could make a bash script for that, it would look like this pseudo code. # Fist backup your current server cp -r /path/to/your/server /path/to/backup/folder # Make sure you extract the files in your current server folder cd /path/to/your/server # Download and extract the server, (please note that there might be newer version available, check here: [url=https://nightly.multitheftauto.com]https://nightly.multitheftauto.com[/url]) before you download. wget [url=http://linux.multitheftauto.com/dl/]http://linux.multitheftauto.com/dl/[/url]140/multitheftauto_linux-1.4.0.tar.gz tar -xf multitheftauto_linux-1.4.0.tar.gz rm multitheftauto_linux-1.4.0.tar.gz
  5. Mr_Moose

    How?

    First you need to check if your server support 64bit applications. Use: uname –a To get this information, For 32-bit systems you'll see this: (“i686” or “i386”). And on 64-bit systems this: (“x86_64”), now, are you using a 64 bit system? then let's continue. Download the 64-bit Linux server from here: https://nightly.multitheftauto.com/ Configure and start it then you have a 64-bit server. Additional libraries may be required, but you'll find more info about that in the sticky topics within this board.
  6. That's why I like git as it's extremely effective when I need to modify something quickly and distribute it to a large amount of servers Thanks for reporting this issue. The modshop however, is unfortunately compiled which is sad as it's a good system, it was created by Dennis and you'll find it here: https://community.multitheftauto.com/index.php?p=resources&s=details&id=7001. I managed to modify it a bit but as it is compiled I assume I'm not allowed to redistribute it, so you may have to find other ways. The vehicle system will save the mods that is currently applied to the vehicle, so it doesn't matter which mod system you use, even the admin panel works.
  7. Good point, the list are already sorted in ascending order as it comes to the client to be shown in the GUI and the built in sorting function really mess things up as you said. It's fixed in the most recent version, enjoy. https://github.com/GTWCode/GTW-RPG/commit/fe4428b600c885464137996ea1ece5f988f5b1ed
  8. Mr_Moose

    horn

    Custom horn sounds? well this might not be exactly what you're looking for but it's relatively close I suppose: https://github.com/GTWCode/GTW-RPG/tree/master/resources/GTWtrainhorn
  9. @Wisam, Actually there's no need for limitations, first let's have a look at the database file, a single vehicles won't need more than 500b of data as it's mostly integers, that means 2 million vehicles is required before the file even reaches 1GB in size which is pretty fair I suppose. When it comes to the spawn part you may be right, to many objects at the same point will cause lag, but it's hard for a single player to afford over 100 vehicles and then spawn them in the same place, they won't really win anything on that as everything is cleaned up and saved into the database as soon they leave the server. @Chronos, The priority of a limitation feature is low currently, but feel free to do a pull request if you wish: https://github.com/GTWCode/GTW-RPG/pulls @LaCosTa, Thanks
  10. Mr_Moose

    Bank system

    That doesn't check for negative amount, remember to patch that bug if you're going to use that system, otherwise you'll soon see all players running around with infinity amount of money in their pocket.
  11. Segmentation fault occurs when an application attempt's to read from an address in memory that doesn't have any data assigned, are you sure your installation is correct, that all .so files are in correct place etc.. Did you follow this tutorial: https://wiki.multitheftauto.com/wiki/Installing_and_Running_MTASA_Server_on_GNU_Linux, there's a lot of useful information there that might help.
  12. Mr_Moose

    Question

    That loop you got there will proceed forever as 1+1 will always be 2 If you intend to use element data for what can be assumed as a safe zone (colshape), you should set it's value to true respective false once a player enter or exit that area and then check it client side. local safeArea = createColRectangle ( 0, 0, 15, 15 ) function safeEnter ( plr, matchingDimension ) if getElementType ( plr ) == "player" then setElementData(plr, "AfkZone", true) end end addEventHandler ( "onColShapeHit", safeArea, safeEnter ) function safeExit ( plr, matchingDimension ) if getElementType ( plr ) == "player" then setElementData(plr, "AfkZone", nil) end end addEventHandler ( "onColShapeLeave", safeArea, safeExit )
  13. Mr_Moose

    Question

    From a performance view you should count with similar performance on your server as you have on your clients, due to that it's pretty smart to do the heavy calculations on the clients instead of the server (if possible). In the case with player and ped damage it's client side you should go for as well, client side events will trigger before the damage is set, and can therefore be blocked by cancelling the event. Doing it on the server means using timers to restore health after the ped/player is damaged, which is a huge waste of valuable performance. Here's a client example from wiki: function cancelPedDamage ( attacker ) cancelEvent() -- cancel any damage done to peds end addEventHandler ( "onClientPedDamage", getRootElement(), cancelPedDamage )
  14. Thanks Try navigate to the root of the Github page, there you'll find a "download as zip" button which should do what you want.
  15. I wrote this tutorial from practical experience after hosting over a year for a couple of communities, the key is to have a plan B in case of errors, the most common ones are blackouts or network loss. I managed to solve them with batteries and a second network with automatic dns redirection. The total uptime then became 99.7% and the servers are running fine as well, here's some demo servers in case you wish to test performance. s3 and s4 are the two oldest machines. *** In short, be creative and use whatever you can use Edit: removed non working server links.
  16. GTW-RPG player vehicles, is an advanced player vehicle system written from scratch with lot's of useful features and innovations you never seen in a player vehicle system before, some examples are found in the list below. Watch the video for more details. Features Shops allover the map Unlimited amount of vehicles Inventory system Optimized to work on older hardware as well SQLite database to store data Information This is a part of the GTW-RPG project available on Github licensed as GNU, (General public license v3). You may use, alter and redistribute as long nothing is removed from contributors. Download https://github.com/404rq/GTW-RPG/tree/master/%5Bresources%5D/GTWvehicleshop Live demo: mtasa://kar-se.404rq.com:22004
  17. Have you tried changing traffic density or restarted while in game, remember that it takes time to start the resource and load all paths. Try /density 0.1 for example. Make sure /debugscript 3 is active to monitor potential errors or warnings.
  18. Server side, a tip is to check the syntax color on this forum or in wiki, orange means server side, red is client and blue shared (works on both server and client), by that you can clearly se it has to be executed server side. 3*60*1000 = 180000ms which is 3 minutes, may be easier to read if it's written as I wrote in my example.
  19. Add this to the resource you want to restart. local _this = getThisResource( ) setTimer( restartResource, 3*60*1000, 1, _this ) BTW why do you need to restart it, there may be better solutions as this is a waste of performance.
  20. That's a compiled file which means you can't change it, the extension of it is *.luac right?. What you can do is either finding an alternative version of whatever the resource does or try injection by adding another lua script that override the compiled file, that's not easy thought. Why do you need to edit?
  21. Try /debugscript 3 in game, there might be client side error which won't be shown in the server console. If you're using windows 7 or later you may need to right click on the file, choose properties and then unblock (if available) as windows 7 block files downloaded from unknown sources. I'm not sure how Linux deal with that kind of block as I always unblock my files before sending them to the server.
  22. It shouldn't be any difference in the behavior of lua scripts between Windows and Linux. Check these points: Did you copy the same code from Windows to Linux, (i.e do you know the copy you have on Linux actually works) Did you updated permissions and owner? "chmod +x script.lua" and "chown YOUR_USER script.lua". Does the resource start without spawning peds and vehicles or does it not start at all?
  23. Mr_Moose

    about php

    Your script does not have permissions to write to the server's disk, try chmod +w on the folder your scrip is trying to write to.
  24. Mr_Moose

    HASH

    Not at all, just a guess from an old memory, all I remember is that it was a hard to crack algorithm, plus salt on top of that. There aren't lot's of hash algorithms available anyway so you could also count the bits and try the algorithms with the same length. That's a great thing about hash algorithms, the result length is always the same.
  25. Mr_Moose

    HASH

    Have you tried SHA2(password+salt), I think I tried that long ago and got the same result as the stored password.
×
×
  • Create New...