Jump to content

Mr_Moose

Members
  • Posts

    866
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Mr_Moose

  1. There are different resources managing different parts of the stores, some private and some public. That's why you only see some of them like notifications. GTWammunation and GTWhwshops are the two resources managing all the weapon and tools shops, the plan is to merge them all into a shop resource and include other types of shops in there as well.
  2. Account data is actually an SQLite database running in the mods/deathmatch directory so it's only accessible by the server itself and not from the resources, with a "regular" SQLite database you can use functions like dbConnect and similar allowing you to design your database easier, although in both cases it's still SQLite which is stored in db files in your server directory. While you're moving away from account Data I'd recommend moving to MySQL as well since it's even more flexible, for instance the fact that multiple applications can access it at the same time (not possible in SQLite), you can have your database on a different server and easily manage/view the data from a web based interface.
  3. Seems like we forgot that resource completely, GTWranks is basically just a list of ranks bound to player stats in the team features, should be safe to merge so I'll update later today. Thanks for reporting it.
  4. Acceleration is like engine performance, if set to low the vehicle simply becomes to poor in it's performance to gear up and thus it can't reach it's top speed. It takes hours maybe days of work to get these things to work properly since most of the handling parameters affects the others in some way.
  5. Mr_Moose

    Chat command

    @pro-mos, It should be like the example below to be correct: local message = table.concat ({ ... }," ") The variable ... is actually an array of remaining arguments allowing you to enter a full string of text (including spaces which wouldn't work if a normal variable where used). The function for the command handler should look like this: function (plr, cmd, ...) local message = table.concat ({ ... }," ") -- Do something with the message end Where the first argument is the player executing the command, second the command itself (useful if you have multiple command handlers to the same function and want to treat them differently) and last but not least ... an array of all remaining words/arguments (the message) entered with the command.
  6. Command to job ID translation for armed forces are located at: civ_c.lua at line 302 and below. Line 335 holds the actual command if you wish to change that. Bear in mind however that when you change those values you also have to update: data.lua at line 370 and 399 to match your new names and ID's. To change the time it takes to capture a turf all you need to do is to change this: local time_to_capture = math.round((tonumber(getElementData(source, "sizex")) or 0) * (tonumber(getElementData(source, "sizey")) or 0) * time_reduce_factor, 3) to this: local time_to_capture = 60 assuming you want 60 seconds constant time to capture
  7. That depends on which virtualization engine you're using, VMWare is the most used one, available for both Windows and Linux, although it seems to use most CPU/RAM it also has 3D accelerated graphics which is useful if you want to play without lag. VirtualBox is another option, it's from Oracle tho and you won't get any good performance, especially not for gaming but just like VMWare it's multi platform. If you're on a windows host then Hyper-V is the perfect choice as it's best to utilize system resources, especially RAM/CPU and disk, there's no hardware accelerated graphics but you can run many instances on the other hand. KVM is a lightweight option for a Linux host but that's a terminal tool which could be complicated for beginners. Another thing you have to consider is what system you plan to use in your VM's, copying windows instances may conflict with their licence agreements while Linux requires some configuration just to make the MTA client work, I do know it works on Ubuntu 15.10 64-bit with latest wine and play-on-linux installed.
  8. That color is a result of these three parameters: defR, defG, defB, so to make it red you just have to set defR to anything between 255 and 50 and the other two to 0. A lower value means a darker red. All those parameters are defined at the top as global.
  9. You didn't mention clients specifically and if that's what you're planning to do then don't expect any help here. Virtual machines would be your only option. The reason for this is simple, if there was an easy way to run multiple client instances then people would use it to fake clients on their servers and it would be impossible to know if a server has players or not. However you can make bots out of existing objects like in this resource: http://crystalmv.net84.net/pages/scripts/npchlc_traffic.php
  10. Start by using the built in performance browser to see if the problem is in one of your resources, if not then it's probably your host. Contact them and see if they can help you, otherwise, change to a better host. viewforum.php?f=116
  11. You don't need sandboxie, virtual machines or anything like that. All you need is to use different ports for each instance so that they don't conflict with each others. Changing ports can be done in almost any network application available (never seen any that couldn't) and MTA is no exception. Locate this file: "mods/deathmatch/mtaserver.conf" then find and change these two lines: <serverport>22003</serverport> <httpport>22005</httpport> These are TCP respectively UDP so you can use the same port for both of these. The query port is always server port + 123. As soon you done that you can run how many instances you'd like on the same machine without any additional applications. PS: changing ports in config files or as command line arguments works for Half-Life based servers too.
  12. Upgrade again, the first three items where added yesterday in GTWcivilians merged from GTWteam. That includes the two commands /endwork and /criminal and a GUI attached to the F5 key showing you the current job progress. That resource had in fact a lot of core features regarding teams and civilian jobs. Ammu nation, hardware shops, gym's etc are all shops which will be merged into a shop resource within the upcoming weeks, they are all based on the same code and new additional features will be added as well. Some missing features can be found here: https://code.404rq.com/
  13. Jack, Ted and RickardETW shows how to take the GTW-RPG farming job into a whole new level, enjoy the "Weed" train. Could a farmer be lazier than this? Can we attach other useful stuff to our trains? let us know in the comments.
  14. Start by looking for alternative functions and their syntax to see if it's actually possible to rewrite it, then you need to write a proper replace script that goes through the entire project and update everything. Although the chances of success are small it might work for some of the scripts at least. A better way is probably to look for open source alternatives that could act as replacements for systems you can't convert properly, stuff like interiors, spawn management, maps, chat bubbles whatever. It mostly depends on how your current game mode is written after all.
  15. News: GTW-RPG v3.0 will be released with multi language support The new standard for translations has been set and the first example has been implemented, it's time to translate GTW-RPG into all worlds languages through a structured translation system, here's how it's supposed to work. In each resource there will be two files: s_lang.lua and c_lang.lua containing all the output text used by the resource, these are loaded before anything else and will have a layout like this: -- Definition of default language for this resource r_lang = exports.GTWcore:getGTWLanguage() or "en_US" -- Language text storage for this resource txt = { -- English/English ["en_US"] = { ["msg_no_spam"] = "Do not spam commands!", ["log_cmd_issuer"] = " issued the server command: '", }, -- Swedish/Svenska ["sv_SE"] = { ["msg_no_spam"] = "Kommando spam är ej tillåtet!", ["log_cmd_issuer"] = " utförde följande kommando: '", }, } Now, the first thing this does is to check with GTWcore for the language specified in the settings.xml file, if that's not set then the local value is used which could be set per resource individually. Default will always be English however. The table: txt is global, txt["en_US"] holds all the English translations. Within the resource script files we're calling the translations this way: exports.GTWtopbar:dm(txt[getElementData(source, "GTWcore.language") or r_lang]["msg_no_spam"], source, 255,0,0) Where getElementData(source, "GTWcore.language") holds a language defined by the user, this means that each client can choose their own language only seen by themselves. r_lang is the resource language definition gathered from GTWcore which get's it from the server settings file within GTWcore. The last brackets holds the message ID which is the same for all languages, this makes it easy to know what to translate into what. The global server language (not overriding clients choices) can be set at: GTWcore/data/settings.xml <option name="language">en_US</option> Bear in mind that there's no fallback feature implemented yet, if a translation doesn't exist the message should fall back to English in a optimal implementation, the decision so far is to use a function rather than the actual table. More details will be published soon.
  16. Depending on how you enter the ammunition store you may end up in the wrong dimension and thus you won't see the marker obviously, why adding a store and waste server RAM in a location normal players can't access? Anyway the solution is simple, just download the latest version and use this included interiors resource: [download] which is a fork from the default one but with all the GTW-RPG specific interiors added as well. Secondly, about rental vehicles vs npc cars. I'm sure you could steal a car in real life and get away with it, just change the plates, take it to a nearby garage and repaint it etc.. but you wouldn't, because it's so much easier to rent a car. And just like in real life your crime isn't forgotten, in fact. If you're getting chased by a police officer in GTW-RPG your wanted level wont reduce, because escaping the law is also a crime that counts. The algorithm is simple but efficient, as soon a crime is committed and a law enforcer is nearby the wanted level goes up instead of down, as long a law enforcer is nearby all the small pathetic "crimes" counts as well like like hitting a mailbox, standing on the roof of someones car, slightly touching another car with your vehicle, threat another player and so on.
  17. Well the admin panel is and has always been the same, although the key has changed between some versions. Currently it's 'p' but you can change it somewhere in the files. To change the traffic density you'll have to edit "npchlc_traffic_denctrl", that's where the initial density is set during the loading phase.
  18. A milestone has been added for v3.0, the final release. If you have any suggestion or issue you would like to report, maybe something you've seen on our server that you would like to see in GTW-RPG as well then post it as an "issue" on Github (use the link below). By doing so we can all easily see the development progress live. Keep testing the game mode and keep donate so that we can continue to make it even better, thanks for your interest. https://github.com/404rq/GTW-RPG/milestones
  19. The syntax looks like this: int, int, int getTimerDetails ( timer theTimer ) So you have to load the data returned by that function into variables before you can use any of it, like this: local time_left_ms, executes_lesft, total_executes_count = getTimerDetails(timer[g_Me]) Wiki has a pretty good explaination of all this stuff: getTimerDetails
  20. For the first part, yes. But if you intend to use variables in your table you have to assign the data this way: spawns[i] = { posX=posX, posY=posY, posZ=posZ } On line 8. After that you have to move line 9-12 to line 15, right before the last end or your player will spawn in a loop.
  21. It means that the spawnPlayer function expects a player and then x,y and z positions as arguments. Now this may seem a bit confusing since you did provided variables for all those arguments, but your variables are empty and therefore nil. Assuming you store a list of coordinates in your data.xml file you may consider to load all that into a table and then spawn the player, what you're doing now is to create a empty table inside a loop, then generate a random number between 1 and 3 (since #spawns = 3) and then spawn the player using coordinates that doesn't exist in your table. Start by defining spawns as a multidimensional table at line 2: local spawns = {{ }} Replace line 10 with: spawns[i] = { } Then fill the table there somehow and skip the rest. Finally place the spawn function and everything below it at the bottom of the function and use the random number generator there to load the coordinates to your spawn function.
  22. All three words: or, and and not may be seen as logical gates. The first two are placed in between two statements that can be either true or false while not just negate whatever statement it's placed in front of. Consider the two lists below with 4 possible outcomes where 1 is true and 0 is false, last number is the result. AND: 0 and 0 = 0 0 and 1 = 0 1 and 0 = 0 1 and 1 = 1 OR: 0 or 0 = 0 0 or 1 = 1 1 or 0 = 1 1 or 1 = 1 NOT: not 0 = 1 not 1 = 0 So your example code would be considered as true if source is defined (could be anything except nil or false) or if source is an element. If you replace or with and however both the statements has to be true in order for the result to be true, ie. source must not be nil or false but source must also be an element, if source is not an element the result is false. Hopefully all this makes sense, it's all about basic logic.
  23. Default key should be P but I may have changed it to F7 to avoid conflicts, it's the default admin resource with a few modifications and bug fixes so if none of those keys works just check settings.xml or whatever file containing the settings in there. The server name is Grand Theft Walrus and you'll find all information you need on this page: www.404rq.com/servers, you could also use this direct link: mtasa://lon.404rq.com:22005 it will always run a higher version of GTW-RPG than the files on Github or anywhere else for that matter, it's like seeing a little bit into the future
  24. Download the latest version, (r-496 master branch) and read the install.md file very carefully. Especially this part: As you can see on those errors there are many duplicates causing some resources not to load, resources that GTWpolice depends on and thus that won't load properly either. All civilian jobs are not yet included, they are based on the same core however and will be added soon. Markers and the ability to take the job works however. If you intend to just play as it is then I recommend you to join our server.
  25. The F5 button opens a panel that allows you to end your current job, become a criminal and see your current job progress, it's currently in it's own resource and hasn't been included yet since it's not compatible with the rest of the game mode in it's current shape, although the plan is to rewrite it and place it in GTWcivilians, until then you have to rely on commands like: /criminal or /endwork and the stat's GUI bound to F3 to access the same types of features. The F7 key on the other hand is simply a dogmod which you'll find in the community here, and for that simple reason it's not included in the project by default since there's no specific modifications to make it work with the rest of the game mode.
×
×
  • Create New...