Jump to content

myonlake

Members
  • Posts

    2,312
  • Joined

  • Days Won

    40

Everything posted by myonlake

  1. Darhal, don't help people if you can't even give a proper meta.xml to the poor user. <meta> <script src="server.lua" type="server" /> </meta>
  2. Because you're returning it as a value, which makes no sense as you are outputting the chatbox message before the return. Besides, you don't need to return any value at all. addEventHandler("onClientResourceStart", resourceRoot, function() setRadioChannel(0) song = playSound("http://www.181.fm/winamp.pls?station=181-power&style=&description=Power%20181%20(Top%2040)&file=181-power.pls") addEventHandler("onClientSoundChangedMeta", song, onClientSoundChangedMeta) bindKey("F10", "down", "musicmusic") end ) function makeRadioStayOff() setRadioChannel(0) cancelEvent() end addEventHandler("onClientPlayerRadioSwitch", root, makeRadioStayOff) addEventHandler("onClientPlayerVehicleEnter", root, makeRadioStayOff) function onClientSoundChangedMeta(streamTitle) local tTags = getSoundMetaTags(source) if (tTags) then for tag,value in pairs(tTags) do outputChatBox(string.gsub(string.format('#ffffffArtist: %s | Title: %s', tag, value), "f/", "ft. "), 255, 255, 255, true) end end end addCommandHandler("musicmusic", function(cmd) if (not songOff) then setSoundVolume(song, 0) songOff = true outputChatBox("#ffffffRadio state = #ff0000OFF", 255, 255, 255, true) removeEventHandler("onClientPlayerRadioSwitch", root, makeRadioStayOff) else setSoundVolume(song, 1) songOff = false setRadioChannel(0) outputChatBox("#ffffffRadio state = #00ff00ON", 255, 255, 255, true) addEventHandler("onClientPlayerRadioSwitch", root, makeRadioStayOff) end end )
  3. "This resource saves all vehicles, when the server/resource stops, in a SQL database. When you start the server, all vehicles will create." Make sure you have started the resource, otherwise it won't work.
  4. By scripting a vehicle saving script in Lua. https://wiki.multitheftauto.com/wiki/Sc ... troduction dbConnect getElementsByType executeSQLQuery You can also use resources from the community, such as this one; https://community.multitheftauto.com/in ... ls&id=5004.
  5. Internal database consists out of the account data your server sets for accounts. SQLite database consists out of tables, like MySQL, but within MTA without the need to get an external server. You need to know how to script in order to add the save option for vehicles.
  6. They are not saved if they are not saved anywhere. If you never save them to a database, they obviously will never show up later in the game. In order to save vehicles and players with the MTA internal database, make sure your server is running on SQLite or just the internal database.
  7. myonlake

    SQL

    Answered the same question a while ago. Generally it's up to you which one you like the most, but to enjoy all features of SQL, you should choose MySQL (especially if you have a big server with a lot of data).
  8. It consists out of MAC address. Nowadays it is rather easy to fool the system and generate a new one. If I recall correctly, they are based on the hard disk serial number. Well, either way it can be fooled and it can be given a new one to index over the real one. I haven't personally tried changing them, but I have heard that it is rather simple to go on Google and search for it and fake it in five minutes.
  9. myonlake

    GLSL

    Exactly. You might call the current technique out-dated, but hey, what do you expect from a game that was made in 2004? It's not just possible to implement a totally new graphics or shaders to it.
  10. myonlake

    Server Logs File

    Open the .txt file in Notepad++ or some other text editor. Some text editors do not organize the lines properly.
  11. Backup system configuration can be found at MTA San Andreas 1.3/server/mods/deathmatch/mtaserver.conf <backup_path>backups</backup_path> <!-- Path to the backups folder --> <backup_interval>1</backup_interval> <!-- Hour interval of the backup --> <backup_copies>1</backup_copies> <!-- Amount of copies saved within the backup folder --> For me the backup system saves the configuration of the server (acl.xml, banlist.xml, editor.conf, editor_acl.xml, local.conf, mtaserver.conf, server-id.keys, settings.xml, vehiclecolors.conf) and the databases of the server (internal.db, registry.db, stats.db).
  12. It consists out of MAC address. Nowadays it is rather easy to fool the system and generate a new one.
  13. Exactly. Additionally, there is a limit of queries or connections allowed at the same time. You should really try to squeeze them all into one big query, which may even fix the issue.
  14. myonlake

    toJSON

    As far as I know, element/account datas do have a limit of bytes it can handle. Try using SQLite for storing that JSON.
  15. I am not really a lawyer, but like JayR said, it would be a fraud to spend money to something else than what you say they will be used for. Also, it depends on what kind of profit you're making. Sometimes if you're getting paid for scripts and maps and your profit goes very high, you should think of starting a trade name of some kind. Otherwise the tax office will start following your side business, even though they rarely do strike on personal accounts just like that, and random profit is legal. Anyways, you can get profit any way you want without problems, just make sure they will be used accordingly and you inform your users where they will be used for if you want to keep it up.
  16. In addition to that, compiling can be used to make the code run faster and more efficiently (this is what I understood). I rarely compile my scripts unless there is a reason for doing it, however. I don't have my scripts cached on the client's computer, so unless they know where the code is, they won't be able to copy them either. But I think copying code is a very lame way of doing things and honestly I don't care. They will still be unable to use the code I am using as the code is running most on server-side and has server-side triggers, exported functions and stuff. So it'll be useless. You just have to design your code structure so that it will be harder for the clients to copy stuff.
  17. myonlake

    Freeroam

    In addition to that, there are some commands that are still available. You should look around the file and disable the commands with the same style as Prestege showed above.
  18. I recall map editor already having a setting for host-only saves. And if not, it's not hard at all to make a small if-check around for the player, honestly. Texture changing is as easy as it can get like Solidsnake said. These are quite unnecessary suggestions.
  19. Only luac.multitheftauto.com works nowadays even if you made your own compiler.
  20. myonlake

    Server not working

    I suggest uninstalling MTA and installing it to another folder. Another way is to just delete all contents from the client resources folder.
  21. After playing around with executeSQLQuery, it seems that it didn't even want to work with me. I suppose I was using it wrong or it is for SQLite. And yes, I wasn't paying attention at first, they both do return a table so it's no different Decided to switch back to the db* functions. Well, thanks anyways
  22. Hey, I have been using a few separate MySQL resources before to make SQL querying easy for myself. However, after taking a glance at the database functions I found that there are three functions that do nearly the same thing. dbExec - SQL queries without a result dbQuery - SQL queries with a result executeSQLQuery - SQL queries with a result I have so far been using the db* functions, but I want to switch over to executeSQLQuery because it has a simple result without the need to for-loop everything. Is this a good idea? I heard some time ago that executeSQLQuery is not recommended/supported anymore, but Wiki shows otherwise. Should I stick with db* or switch over? I am using MySQL by the way.
  23. MTA Internal Database + Simple functions and use + No need to set up and install an external server for database - Limited actions - Doesn't have the ability to do stuff that SQLite/MySQL does (altering, etc.) - Slow (?) MySQL + Ability to make tables to save specific data in + Ability to modify tables and do stuff with them + Good for big data saving and managing - Slower than SQLite - Need of an external server to run - Easy but complex querying SQLite + Fast + Nearly the same abilities as in MySQL (limited however) + Good for semi-big data saving and managing + No need for an external server in order to save - Doesn't have all the abilities than in MySQL - Easy but complex querying If you want to save a few stuff about a few things then you can use the internal database or SQLite. If you're saving a lot, use MySQL or SQLite. My personal favorite is MySQL but I guess it's because I've used it more times than the two other ones.
  24. myonlake

    bodyguard

    I have a similiar resource for similiar meaning. I'll upload it soon and let you know.
×
×
  • Create New...