Jump to content

Mr_Moose

Members
  • Posts

    866
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Mr_Moose

  1. That one is as simple as it could possibly be, don't be afraid of long data tables or detailed GUI code, read it line by line and you'll find out how it works pretty fast. There are other spawn systems too but most of them doesn't use tables and are full of bugs.
  2. You have to use it the correct way, and follow the correct syntax
  3. getAccountData setAccountData addCommandHandler Those functions are pretty much all you need for this. If you're getting stuck, feel free to ask for help.
  4. Well if you can't find any resource you have to write them by yourself or pay someone to do it for you. I would recommend the first option so have a look at these functions which may be useful for what you want to do. getAccountData getElementData setAccountData setElementData call(getResourceFromName("scoreboard"), "addScoreboardColumn", "kills") Capture the 'onPlayerWasted' event to run the script any time a player dies.
  5. Well the syntax seems to be correct, but why not use dbConnect instead, those functions has built in features to prevent some SQL injections as well which is a common way to 'hack' a mysql database.
  6. Where did you get it then, maybe the original author can help you.
  7. Ops, my mistake. You are trying to get the length of an object named 'vehicles' (on line 4 according to the error log but it doesn't seem to be that in your code). That error can't be related to mysql, check your entire code for a syntax like this: #vehicles Because that's pretty much the only place you can attempt to get the length of an array.
  8. You may have forgot to define 'vehicles', vehicles = { } Can't remember exactly what the meaning of that error was but it's obviously something related to the variable named vehicles. Since object orientated programming was implemented recently as well you may be careful defining objects with the same name as the class such as 'player' or 'vehicle' as in this case.
  9. Is this what you're looking for: https://community.multitheftauto.com/index.php?p=resources&s=details&id=8338?
  10. Mr_Moose

    Housing

    dbConnect("sqlite", "housedatabase.db") That's all you need. If you really want to use MySQL instead you have to learn how it works first.
  11. Mr_Moose

    Housing

    How hard could it be, you need to configure your database as I said before and then you just go in game and use /createhouse to open the GUI which allow you to make a house, you need to be admin in your server too.
  12. Mr_Moose

    Housing

    You could use SQLite as well for that system, unless you don't have to share the database with other servers or show advanced stat's on a webpage SQLite works perfectly. See the documentation for dbConnect
  13. Mr_Moose

    Trains

    You could compare the distance between all train vehicles once they are moving and attach them (MTA 1.4) with attachTrailerToVehicle when they are in a proper distance. And detach them with a command for instance using detachTrailerFromVehicle All code you need is in here. Good luck.
  14. That one is open source, you need some modifications thought but it works.
  15. I guess it'll work on a Linux system, on Windows I'm afraid the server locks the file and makes it read only but you could try of course. Not the best solution maybe but it could work, the copying part will work at least. A quick test would be to remove the log during runtime, see what happens, if it's even possible and so on.
  16. You're getting errors in your headshot resource. Can't see the line number on debug script in your video clear enough but line 6 or 8, attempt to compare number with boolean. Something goes wrong there and the event seems to be cancelled basically.
  17. You can't load that file during runtime, it only loads on server start which obviously require a restart as well, 4-5 players isn't any problem, a restart goes fast, just tell them to reconnect soon in the console before you restart and they'll come back.
  18. Depends if you find another way rather than edit the mtaserver.conf file. If you edit that file you need to restart in order to update the paths, I don't think there is another way to do that since you won't change those paths very often.
  19. I assume you call the server function from your client code and expect "source" to be a player right? If so then replace "source" with "client", as specified in the documentation for triggerServerEvent source doesn't always pass the correct player element, you may also check that function on your client script and verify that you pass the correct element as well.
  20. Online mirror created as a media wiki site: https://wiki.404rq.com/ Most pages from categories like: functions, event's, updates, useful tips etc.. should be found there.
  21. I wouldn't recommend any of them, the turf system seems ok but it's pretty basic, there are better open source turfs systems out there. Secondly, that group system is compiled, you have no idea what back doors that could have been built in there and the ability to edit is very limited. You can make it work but that require that you know all details about the group system, like exported functions and what they return and so on.
  22. 1100+ lines in one of the files which seems to contains data tables mainly, my guess: Syntax errors in the tables, try /debugscript 3 and post the error log output if you want help with this.
  23. onMarkerHit server side has an hitElement as first argument, the hitElement is the element who hit's the marker, most likely a player or a vehicle with a player in it. You can check it with getElementType The function would look something like this: function markerHit(hitElement, matchingDimension) end addEventHandler("onMarkerHit",markerHit) Where source is the marker, hitElement is the element hitting it and matchingDimension a bool determine if the player are in the same dimension as the marker.
  24. A complete law and wanted level system in BETA state, it has been running on the AC servers for many months and has been available for a long time as well. The reason for this topic is because of a leak to the community before the official release which got a large amount of downloads and then removed for obvious reasons. The conclusion remains, it seems to bee too popular to be unknown for the world, so let's take the full details: Download link: (BETA) http://code.albonius.com/?action=download&id=8523e282173778cc46739ae4405d3784 Features: Contains GUI with skin selection for the police officer job Commands to join SAPD, Army, SWAT and FBI (same as the names with lowercase) A wanted level system that trigger on most kinds of crimes, everything from killing to hitting a mailbox or crashing your car. Hit a wanted player with your nightstick to arrest. Markers in every jail cell (Inside LSPD, SFPD and LVPD) to deliver the arrested player Ability to transport your arrested player in a car without the ability for the suspect to escape. Tazer which forces the suspect down on the floor when getting hit from a short distance Kill arrest on violent suspects (otherwise they'll respawn at the hospital) Data file for easier configuration Exported functions to set trigger a crime and set wanted level, getting distance to nearest cop or criminal etc. to implement your own tracking system. Installation: (Hard) The system itself are ready for use but it's dependent on many other resources, alternatively you need to create an extra script file that set's up the rest. See the below list for known configuration requirements, in order to make this work you need some scripting skills as well. That's why it's set to BETA currently. Replace: 'exports["AC_message"]:outputTopBar' with 'outputChatBox' or download our top bar messages resource: https://community.multitheftauto.com/index.php?p=resources&s=details&id=8620 Add the following teams: "SAPD", "SWAT", "FBI" and "Army". (see law-job.lua) Make sure the element data "Wanted" is set on every player. (Fixed in the most recent version) Download AC vehicle spawn system to get spawners for police vehicles at any police station. Start the resource "interiors" (applies to those servers that doesn't have a way to get inside interiors). For support and bug reports see: http://games.albonius.com
  25. Removed credits: https://community.multitheftauto.com/index.php?p=resources&s=details&id=9796 Original (Stolen from AC:Games): http://code.albonius.com/?action=download&id=8523e282173778cc46739ae4405d3784 Edit: Some GUI elements appears to be stolen from SAUR:RPG. DONE
×
×
  • Create New...