-
Posts
866 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Mr_Moose
-
Ok so you got this error now: "attempt to call a nil value", that's a clear indicator that something doesn't exist, are you really sure that you have this line: meta.xml <export function="otherTestFunction" type="client" /> in the same resource you have the exported function? Are you completely sure that both these resources are running? Try to refresh all and then reconnect to make sure you get all the files you need.
-
Callum is right, it's pretty much impossible to define an exact amount, however I got a few examples as a reference which I know works. I'm running the latest version of Linux Debian on all my servers since it's really resource effective, ram usage is around 100MB in idle if you have 1-2GB in total so with 4GB you may calculate with 150-200MB, that leaves the rest for your mta server, (mysql and apache2 fits in those 200MB), if your hard drive runs at 7200rpm you can gain advantage from it's swap file up to 1 or 2GB (your swap file might be 4-8GB), Linux systems are generally good at using the RAM as effective as possible including the swap file. You don't need to worry about the CPU because that's a really good one you have there. Here's a few examples which still had some more performance to give, all running Linux Debian or crunchbang. 15 years old HP laptop, 1GB ram (upgraded), 1.2Ghz pentium single core, 60GB hdd, max 63 players online (default freeroam) 8 years old hommade PC, 2Ghz AMD athlon 64bit, 2GB ram, x4 320GB hdd. Did a lot of tasks at the same time, teamspeak, irc, minecraft, 4 mta servers (256 slots in each), apache2, ftp, remote desktop and many more also just below 100 players online spread over the MTA servers and a few on the web. In short, you don't need to worry even if your scripts aren't the best optimized, I would recommend starting low (128-256 slots) and then go up if needed, most MTA servers will never have more than 100 players online at the same time anyway, and if you do you can probably afford a better server
-
The reason is usually that you have an error in the exported function, otherwise you get other types of error outputs in the script debugger, try comment everything in "otherTestFunction" and add something simple like outputChatBox("test") just to see if that works and you get the output, if it does then you have a problem in your exported function which you can find by calling it from the same resource while debugging.
-
You could take a look here: mtasa://s3.albonius.com:22003. Since version 2 of that server has been released I'm going to shut down this old one and the scripts in it won't be used anywhere else. This means it will be cheap, just note that I made ~80% of the resources in there so I'm not allowed to sell remaining 20% of it's resources for obvious reasons. Feel free to ask about individual resources in there.
-
Then just download the 1.3 Linux server: https://nightly.multitheftauto.com/
-
If you use 1.3 it's time to upgrade, most players use 1.4 by now. If tar doesn't work for you then you need to install that package. Which distribution are you running?
-
What is the problem then?
-
Are you sure? couldn't though it was such a difference in using strings or integers as keys. I'm not an expert in lua tables but maybe this could be helpful: http://stackoverflow.com/questions/2705793/how-to-get-number-of-entries-in-a-lua-table. Someone that appears to have the same issue there.
-
I recommend this tutorial: https://wiki.multitheftauto.com/wiki/Installing_and_Running_MTASA_Server_on_GNU_Linux. After that you can copy your entire resources folder and merge it into your Linux server resource folder. In your mods/deathmatch folder you find "registry.db", "internal.db" and "mtaserver.conf" which contains settings, user accounts and other relevant stuff, these can be copied and replace as well but remember to make a backup just in case it fails. And that's pretty much all you need to do.
-
It depends on how you define your table, see this example in how you can use the # symbol to get the length. local myTable = { [1]="something1", [2]="something2", [3]="something3" } local myTable2 = {} myTable2["something"] = somethingElse outputChatBox("Length of table1: "..tostring(#myTable)) outputChatBox("Length of table2: "..tostring(#myTable2))
-
We apply the same logic here as for those who doesn't own a hosting company, no one force you to join or even buy or get an old computer if you don't want. Just because you don't have the ability to become a part in this project doesn't mean nobody has that, right. I'm not saying old PC's specifically, basically any device that can run Linux and isn't used for anything else currently. Some people host their own MTA servers but their hardware can handle more servers without any trouble. @bradio10 Not really a hosting company, see it more as a project to help smaller hosting companies (or people that just have some old servers up and running for fun) cooperate and find customers. There are many ways regarding the security as well, it's all depending on what kind of attacks we are dealing with, DDoS for example would be very hard with many servers spread around the world, physical attacks such as cutting of the power or the network cables would be hard as well, at least you can't take down all the servers at once like in a datacenter. While a datacenter offers other advantages, it's all depending on what the end user need in every single case. Regarding performance I would say that it's fully depending on what a customer needs as well, I have long experience in running MTA servers on low performance devices and it's all depending on how much you can optimize the software. Anyway thanks for your feedback, see this as an open suggestion, if we have a lack of interest then I'll make this to a regular tutorial with easy installation tools included about how you setup your own Linux server since that might be more useful for some people.
-
It's relatively new terms in the server industry but it refers to the classical picture people have of a large hosting company, a storage building in the middle of nowhere filled with servers. By spreading out smaller servers allover the world this could be one of the safer and faster hosting solutions available but we are only at the beginning so far. 3 servers in different locations in Sweden is available so far but there is still work to do on global control panels and stuff like that. With this topic I'm searching for people with old computers available that could become a good server for a couple of MTA servers and of course general interest in a project like this.
-
Our first goal now is to present this idea and find out if there is any interest, I have no idea whenever it has been tried before or not but let's call it "franchise hosting". The idea is simple, AC:Games is the organization at the top who runs the global websites such as forums, code libraries and info channels (and of course social media). Below it we have the small hosts which could be described as people who runs one or more servers on their home network just for fun. Usually it's not easy to find customers while running your own server, people doesn't know if they can trust each others or how payments and stuff like that are supposed to work, our goal is to setup standards for that part as well. Like global rules that applies to all servers who would like to join this project which includes everything from naming, file system layouts and most important safe payments without scamming. There is still a lot of work to do before we can release this project fully but we recommend people that want to join to start setting up their servers as early as possible. There are tutorial links currently but I will make scripts out of these that automatically configure the servers after installing a proper Linux distribution with the useful packages, everything well tested and open source of course. Once again, feel free to ask or discuss in here. All feedback are useful.
-
Introduction Unlike other hosting solutions this require that you do some of the work by yourself, in return you get your own 24/7 server which will be able to host your own MTA server and maybe even become helpful for your friends servers (depending on it's performance). The solution is this free tutorial with easy installation scripts included which will do most of the work for you. It's currently a basic solution, but it will be improved over the time. Please note that this guide aims to more experienced users, if you don't have all required tools available use another solution, you are also by yourself responsible for any consequence you may face by following this tutorial. Advantages It's free (you may even earn some money from this) (Optional) Your own webserver (Optional) Your own mysql database (Optional) Your own file server (Useful for backup) Requirements Check below list to see if you have what it takes, please note that it's only my recommendations based on my own tests and in some cases you may need more or less powerful hardware or solve your problems in other ways than those I suggest here. A stationary PC (mid tower, full tower or anything that is easy to modify and repair, also avoid plastic chases since they may cause a fire if overheated, (security first)). A raspberry pi or similar would also be a great choice if you want something new for a low price. Reliable cable network, don't use a wireless connection for your server unless you're goanna host it on the moon. try to have at least 10mbt/s up and down, (you may be fine with less but if you want to avoid slow download speed or general lag it's recommended) Reliable hardware, don't look yourself blind on performance, you're not building a top of the line gaming PC and you're not goanna host CIT, some hardware that works just fine are for example: RAM 512MB, 1GB, 2GB, 4GB CPU > (minimum) 512MHz single or dual core, recommended > (1GHz) from single core and up. HDD, always use at least 2 so you can backup anything, their size doesn't need to be larger than 32GB, keep your cat away (if you have any). Server operating system, think of it, when you use another host you'll probably rent a VPS to which you connect with ssh from a terminal (Putty on Windows), so you won't need nice looking graphics or GUI on this server, I recommend anything based on Linux Debian, especially the No GUI version which uses a really low amount of resources giving you access to almost all performance for your MTA server and other apps you wish to run. Warning Do NOT continue unless you are sure about this, You're doing this at your own risk, Feel free to ask about this but don't expect me to solve all potential issues you may face, I'm not taking any responsibility in case something goes wrong when you try this, if you follow the tutorial there shouldn't be any issues. Choose a distribution For a server like this, which is most likely going to run on an older PC with poor performance, Linux is the obvious choice, Game servers generally need to have as much RAM and CPU power as possible, Windows is usually taking up as much RAM it can get while there are many Linux distributions using less than 50MB ram. First of all, find out the info about the PC you are going to use and choose a proper Linux distribution from the list below. More of them will be added soon based on comments and what I know works so far. Debian x64 net installer Debian x86, i386 net installer Please note that these might take a couple of hours to install but it's worth it. Get the MTA server You'll find a pretty nice tutorial in how to install the MTA server in the wiki, however, if you're too lazy to read all that you may use the below bash script instead. #!/bin/bash # Make directory for your server mkdir /home/$USER cd /home/$USER # 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 # Download, extract and install default config files wget [url=http://linux.multitheftauto.com/dl/]http://linux.multitheftauto.com/dl/[/url]140/baseconfig-1.4.0.tar.gz tar -xf baseconfig-1.4.0.tar.gz mv baseconfig-1.4.0/* multitheftauto_linux-1.4.0/mods/deathmatch rm baseconfig-1.4.0.tar.gz mv multitheftauto_linux-1.4.0 mtasa-server cd mtasa-server # Start the server ./mta-server Running the script (optional) Copy the script from above code box and add it to a new document named "install.sh", make it executable by doing "chmod +x install.sh" and then use "./install.sh" to execute it and it will download, install and start the MTA server for you. Source: https://wiki.multitheftauto.com/wiki/Installing_and_Running_MTASA_Server_on_GNU_Linux Port forward This is required to allow people from outside your network to access it, see this page if you need help with that. Clients connect on port 22003 UDP by default (if nothing else is specified in "mods/deathmatch/mtaserver.conf"), your built in webserver are located on port 22005 TCP and your ASE port where game monitors including the server browser can find your server is on default port + 123, in this case 22003+123 which is port 22126 UDP. Extra features Ok so now you have a Linux server running a default MTA server, but a good server also need some kind of website with forum right? that's where the LAMP server comes in, (Linux, Apache2, MySQL, PHP server). It's also relatively easy to install but even easier with the install script below. # Update and install apache2 (webserver) sudo apt-get update sudo apt-get install apache2 # Install MySQL (use default settings and pick a strong password) sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql sudo mysql_install_db sudo /usr/bin/mysql_secure_installation So this is what you need to make a html website and being able to use MySQL, to install php, see the source tutorial (advanced users). https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu, php makes it possible to install a forum like MyBB, SMF or PhpBB if you prefer, something most communities need. Aditional packages Here's a list of other useful packages you may install on your server, they should work on most Linux distributions. Use "sudo apt-get install ..." to install them. lm-sensors fancontrol #Ability to justify your server fans and monitor temperatures for a perfect balance in noise and cooling openssh-server openssh-client #to access your server remotely, upload files via sftp, make certificates for encrypted connections and many more. screen #To keep your session alive after closing your terminal and to run multiple servers at once. samba #Share files with other PC's on your local network via their file browser. htop #Usually installed by default but views performance usage in a nice looking way. vsftpd #Lightweight and secure ftp server. And that's it, good luck.
-
From a wild guess I would say that the hash key is probably a way to choose encryption algorithm for user accounts, you could try 'md5', 'sha2' or similar in that field, if it doesn't work you'll find out. I still believe that you got scammed with this script though: https://forum.multitheftauto.com/viewtopic.php?f=91&t=79817.
-
Sure, the bindKey function comes in two shapes, one accept functions and the other accept commands which also trigger a function at the end, so all you need to change is this part: bindKey ( source, "r", "down", reloadGun, "Reload" ) into this: bindKey ( source, "r", "down", "seatbelt", "Toggle seatbelt" )
-
Something like this maybe: function reloadGun ( player, command ) reloadPedWeapon ( player ) end function resourceStart( ) local players = getElementsByType ( "player" ) for k,v in ipairs(players) do bindKey ( v, "r", "down", reloadGun, "Reload" ) end end function playerJoin( ) bindKey ( source, "r", "down", reloadGun, "Reload" ) end addEventHandler( "onResourceStart", root, resourceStart ) addEventHandler( "onPlayerJoin", root, playerJoin ) This is used to bind a function which allow you to reload guns but it's easy to work with and modify for your needs, good luck.
-
Every line is connected to a set of markers in where you can spawn vehicles, first one is occupation setElementData(thePlayer, "Occupation", "OCCUPATION_HERE") Leave that field blank if you're not using occupation, second column is team, change it to whatever team name you want to give access to the vehicles, and the last one is the highest allowed wanted level, that uses the built in wanted level system.
-
Then it does work, it checks for team and occupation (element data) before it allows usage of a marker, that need to be set in the veh_data.lua file.
-
Enter "/debugscript 3" in your server console, look at the output and if you don't understand it then post it here, then we can help you.
-
The syntax for dbConnect is like this: element dbConnect ( string databaseType, string host [, string username = "", string password = "", string options = "" ] ) You are trying to connect to a local database on your Linux server while those login details (Which is extremely stupid to post in a public forum like this) goes to an external database hosting company of some kind. Now which one are you using? If you're using a local database you may need to reinstall it and make sure the service is running, see this for more info about that: http://wiki.albonius.com/wiki/LAMP_Server If you're using an external host for your database just update the syntax with the correct login details, IMPORTANT Do not forget to change your database password otherwise anyone can hack it.
-
What part isn't working for you? Try /debugscript 3 and check the output.
-
I checked it and it was one of the worst looking websites I've ever seen, trust me, I'm a developer. Missing about page so you can't really know for sure who's running it. Advertising for gambling sites and a free host, if they where serious they could have hired a real developer for their website and also payed for a real host. That's a typical look of scamming pages who often sell leaked scripts. They just trying any way (including illegal ways) to make as much money as possible before they getting discovered and shut down, after that they just move along to another host and continue. Now to the subject, according to them UG are based on Valhalla, as far as I know Valhalla is an open source project licensed as GPL. GPL projects can not legally be mixed with commercial software which it is considered as if someone tries to sell it. http://www.gnu.org/licenses/ I'm really tired and may be wrong on some points here, if so feel free to correct me, anyway I think you got scammed.
-
I'm not going to spend 21$ just to download it and figure out how to help you. Btw that site looks really suspicious, waiting for someone who knows more about that, might be some kind of scam since it's obviously not the MTA team who runs that site.
-
I gave you the answer you wanted, if you need help with a specific script then show where you got it and most important show it's license so we know if you have the right to use it or not.
