Jump to content

Lawliet

Members
  • Posts

    87
  • Joined

  • Last visited

Everything posted by Lawliet

  1. The problem with INSERT INTO / REPLACE INTO is that it inserts all data you'd like to save each time the saving functions gets executed. Basically, this means that you will get several entries of player A having different (or the same) values. If you wish to save the data correctly, you must use UPDATE. What you can do, however, is that when the player logs in for the first time (i.e registers an account), you execute (using exec) a query which INSERTs all needed info into the table. The reason UPDATE won't work is because there is nothing to update, but if the data gets inserted into the database upon registering the player, it can update no problem. This also means that you will have to write your own login panel (or get one from the resources page on MTA's website and customize it to your needs). If you wish to write your own, use getAccount to see if the account exists, and if does not, use addAccount. If the account exists, simply spawn the player. Also, this line in your first post: addEventHandler('onResourceStart',resourceRoot,saveAccount) You are trying to save the data when the resource starts - shouldn't it be other way around?
  2. I suppose you could try it with a combination of guiGetPosition, guiGetSize and guiGetScreenSize. First, you get the absolute values of the GUI element using guiGetPosition and guiGetSize, then simply divide them by the values you got from guiGetScreenSize to get the relative positions. Keep in mind that, since you are basically converting absolute values to relative ones, said relatives values will be tailored to the resolution the absolute values where drawn with. So, just because a GUI element was in the top left corner with a resolution of 800x600, it doesn't mean it will be in same corner too when using a resolution of 1366x768.
  3. Yep, that's because I was the sole developer of VisceraDayZ.
  4. Like CiBeR said, we are still for developers for the team. I'm lifting the age restriction, should hopefully enable others to send their application. Remember, just send me a private message and fill out the form provided in the original post.
  5. Thanks, bradio10, your suggestion was the one I was searching for. Had to adjust it a bit, but now it works like a charm. And Walid, thanks for your help, too. Maybe I can put your code to some other use.
  6. Tried that, didn't work. At first, I got "expected table, got nil" from the clientside, figured it was because the query wasn't in dbPoll, so I adjusted the code here and there. It's still not working, though. The main problem here is that you can't put dbPoll and dbQuery into the same function, because it always returns nil (meaning the Query isn't finished yet by the time you do dbPoll), so you have to put both of them in two different functions. So yeah, if you adjust your code with dbPoll in mind, I'd appreciate it a lot, Walid. So far, it does sound good.
  7. I tried using triggerClientEvent, but to no avail. Returns false, probably because it doesn't pass the data to the client. This begs, naturally, the question whether or not I have done it correctly. I don't mind if someone else was to post his way of passing the data to the local player. I assume triggerClientEvent is the only efficient way to do it, but how exactly do I use it in conjunction with the retrieved data? Oh, and don't even think about directing me to the wiki page, because I stared at that for hours. I know that you can pass arguments using triggerClientEvent, but...how do I do that, and how to use said passed data on the client side?
  8. Before I explain my problem, allow me to describe a scenario. Let us assume you have database called database.db, which stores all info about players (such as name, health, money, position, etc). Now, you wish to retrieve some of the data from the local player and display it via some GUI, let's say, via dxDrawImage. The account is retrieved by using getAccountName. The data you wish to retrieve is, in this scenario, health, hunger and thirst. Said data will be retrieved by using triggerServerEvent from the client. Naturally, on the serverside, you would do this: -- [[ SERVER SIDE ]] -- c_database = dbConnect("sqlite","database/database.db") -- Using the queried data from queryDataFromDB, we assign each value to a variable (health, hunger & thirst) function insertDataFromTable() passed_data = dbPoll(data_table,0) for i,thedata in ipairs(passed_data) do health = thedata.health hunger = thedata.hunger thirst = thedata.thirst end end -- We query for health, hunger & thirst for the player who called the event, who happens to the local player function queryDataFromDB() account = getAccountName(getPlayerAccount(client)) data_table = dbQuery(c_database,"SELECT health,hunger,thirst FROM player_stats WHERE account=?",account) setTimer(insertDataFromTable,1000,1) end addEvent("onQueryDataFromDB",true) addEventHandler("onQueryDataFromDB",root,queryDataFromDB) Do you begin to see the problem here? We have assigned health, hunger and thirst. Let us assume the values are 100, 50 and 20. Now, how do you pass them to the local player? I've been racking my brain for hours over this particular problem now. It basically amounts to this: I'm perfectly able to pass all data as long as it serversided, but as soon as I try to pass data from the server to the client...maybe I'm not seeing the obvious solution here, but in any case, I'd be most grateful if someone could help me out with this.
  9. Great news: Version 0.8a is basically done and we expect release to be slated for 06/20/15 (20th of June)! If all goes as we expect, we'll have a web server + forum up and running, and will offer the gamemode for download there. This also means you can report bugs and make suggestions there. That's also where the uncompiled version will be released. The URL will be given out once everything is ready. Again, 0.8a will be released on the 20th of June!
  10. And yet another update I'd like to announce: a new group_system has been integrated, which allows you to... ...create your own ranks ...edit permissions for each rank ...warn members of your group if they have done anything wrong ...create and edit a "Message of the Day" Features such as the group vault and managing your own piece of land will be implemented in a later version (possibly around version 1.0.0b). A release date is not in sight, unfortunantly, as we'd like to fix a few things first. This includes * driving over zombies * a backwards compatibility script so server owners don't have to replace the internal.db everytime a new update is released Don't worry, 0.8a is well on its way, and it's going to be awesome!
  11. Thanks for your support, Renkon, I appreciate it. Just shoot me a private message once you are free. In other - unrelated - news, I managed to fix the crafting issue, meaning players can now craft items. Only things that are left to do, in terms of crafting, is to add the blueprints and parts to the loot table and set up proper descriptions.
  12. Just a few notes about the upcoming update, version 0.8a. Update 0.8 will mainly focus on releasing what I have scripted myself so far, but a few things .:CiBeR:. suggested will be added too. This includes * Fixing item duping * Adding a "backwards" compatibility script. With this, server owners hopefully won't have to replace the internal.db whenever a new version (or hotfix) gets released. * Adding silenced weapons * Crafting * Part I of the group system overhaul Notes: "Adding silenced weapons" simply means that you can find silencers for various weapons, attach them a weapon of your choice, and - you guessed right - shoot without making noise. Should make things more interesting! Crafting is, as the name might imply, simply the process of creating an useful object out of useless ones. It's a tiny bit buggy at the moment, but that should be fixed soon. Blueprints and parts can be found all over the world, with industrial locations offering a higher chance of finding something. Over time, more parts will be added, and will eventually see use in the next point, namely... ...the group system overhaul. Since the current one is rather lacking, I decided to almost rewrite it from scratch and add some more functions. Part I includes giving ranks to the members of your group, such as Officer, Soldier, Bandit, ... this doesn't serve any real purpose other than giving your group some order and incentive to work, but I've already implemented a permissions system of sorts. For instance, a Bandit has all permissions set to false, meaning he cannot do anything (all freshly joined members of your group start with Bandit). A Survivor has access to the group vault (where you can store and retrieve items for everyone), while a General can queue research projects etc. In any case, we'll probably set up a web server and forum over the next days (weeks?), where we will offer the gamemode for download. Stay tuned, and check this topic often. Send me a private message if you have any questions...and yes, we are still "recruiting". If you want to be a developer, check the requirements in the original post, and if you qualify, send me your application! I'll reply fast, don't worry.
  13. .:CiBeR:. is now part of the development team! We are currently working on Version 0.8a, but more developers are always welcome!
  14. Read the first post more carefully, please.
  15. It's only to ensure mature players actually apply. If I lift the restriction, I'd probably get spammed with messages. Besides, if someone is, like, 17, and will turn 18 before October, and is proficient in the ways of Lua or MTA, I don't see a reason to not apply.
  16. Thanks a lot. It has one particularly jarring bug (still don't know how to fix it because I can't pinpoint the source of said bug), but it shouldn't be much of a problem if people play it the right way. By the way, I am close to changing my mind about the whole compiled issue. Maybe I'll really do it open source, via GitHub...I just have to figure out how to actually set it up. Basically, if the score reaches at least 5 in favor of continuing development, I'll do it. If the score reaches 15:0, I'll make it open source (not immediately, of course, but it will happen sooner).
  17. Uhm, no, he is not. He got it from me back then when I decided to get more developers to work on the gamemode. That's how he acquired it. Technically, I'm the only one left who bought it from Marwin. As for the whole development thing: Again, no, nobody wants to make it his own way. It's mainly because of the whole compiled VS decompiled issue that is brought time and time again. I'd be happy to have more developers (albeit a small cycle) for the gamemode (heck, I'd be even willing to do it open source), but for that to happen, more people have to voice their opinion in the respective topics. Just check out my topic in case you are interested, mihayy5. Again, -ffs-Sniper is not the official owner of the gamemode. He was just a developer. If anyone, it's Marwin who is the real owner, but he left a long time ago.
  18. Yeah, I see what you mean. I'm not going to do that on GitHub yet,though (I have no idea how to set that up anyway). So that means it's a 3:0 score. Just for those who are interested, here's a few screenshots. I'll probably make and upload a video in the near future to showcase everything (like First Person Mode) that will with the new version if more people show interest. The new inventory Crafting in action
  19. But would the server owners actually be interested in using a compiled version? I know that a lot of servers are running on a decompiled one, with their own settings and customizations. Using a compiled version would be like going a step back...that's the feeling I get. Not to mention that I don't see that many responses (mainly people reading it, without actually voicing their opinion). Still, thanks for stating what you think.
  20. I see. Thanks for your opinion. So far, it's more or less a 2:0 score in terms of continuing development or not.
  21. Also, nur, damit ich das richtig verstanden habe: dein Browser funktioniert einwandfrei, du kannst Videos schauen, ohne das du ewig buffern musst, das Forum lädt ganz normal und es dauert nicht 2 Stunden, um ein 300kB großes PNG Bild zu laden? Aber dafür kommt es zum Timeout, sobald du MTA, Teamspeak oder Counterstrike benutzt? Ich muss sagen, ich kenne das Problem, hatte ein ähnliches. Bevor ich dir da weiterhelfen kann, brauche ich folgende Informationen: 1) Hast du bereits einen Antivirenscan durchgeführt? Rootkits? HijackThis? 2) Hast du möglicherweise einen zweiten Computer oder Laptop, auf dem du besagte Probleme replizieren kannst (sprich, treten die gleichen Probleme auch auf anderen Computern auf)? 3) Hast du deinen Anbieter gewechselt? Wenn ja, welchen hattest du vorher? Wie sahen da die Einstellungen aus (DSLAM-Datenrate, Leitungskapazität, etc.) aus? 4) Was für einen Router benutzt du derzeit? Wurde der mal ausgewechselt? 5) Kannst du die Leitungsdämpfung festellen? 6) Gibt es irgendetwas in der näheren Umgebung, das deinen Router stört (gilt, wenn du WLAN benutzt, schließt Wände mit ein)? Hat sich da was geändert? 7) Hast du deinen Anbieter gefragt, ob diese einen Portreset durchführen könnten? Was ist mit Firewalls? Ist da alles korrekt konfiguriert? 9) Generell, wie sieht deine Hardwarekonfiguration bezüglich Router etc. aus? Sprich, ist die WLAN-Box ein eigenständiges Teil oder ist es irgendwo an einen Router angeschlossen? Wichtig ist auch, was für einen Router du benutzt. 10) Hast du mal deinen Ping überprüft? Manchmal kommt es zu einem Spike, weil der Computer überhitzt, dann liegt es gar nicht am Internet, sondern eben am PC selbst. Und ein Pingspike führt dann zum Beispiel zu einem Kick. Ich werde versuchen, dir da, soweit es mir möglich ist, zu helfen, aber dazu brauche ich so viele Informationen wie möglich.
  22. Yeah, I read that. I'd like to continue development, to be honest, but before I do that, I just need to know whether or not people are still interested (I'm not talking about development, I mean actual playing). Before I forget it: There will be, of course, "official" servers too, meaning you can apply for your server to become officially affiliated with MTA DayZ development. In the beginning, this will only serve to show others that your server can be trusted and is worth playing on, but later, official servers will be the ones who receive updates 24 hours before they are released.
  23. MTA DayZ 0.9.8a is now available for download! Check this link to download the gamemode: https://github.com/ciber96/mtadayz/releases NEW REPOSITORY: https://github.com/ciber96/mtadayz Hello, everyone. Some of you might recognize me by my name here, but for those who don't: I used to be one of the administrators of VaveGames, L, and along with that, a developer of Marwin's gamemode, MTA DayZ. FORUM: mta-dayz.org/forum MTA DayZ 0.9.8a is available for download! UPDATE ON THE WHOLE SITUATION: I decided to continue development until October 2015. Until then, the gamemode will hopefully be as polished as I envision it. If not, others can and will "carry the torch". Everything has been set up by me and I am basically ready to go at any time. Before that, though, I am going to "recruit" developers to work alongside me. The repository is located on BitBucket and is, for now, private. Once version 1.0.0 hits (we are at 0.8 right now, that's where we will start), the gamemode will be open source and everyone can help, create their own forks and branches and blahblahblah (I have no idea what I'm talking about, actually). Anyway, developers. You want to be part of it? It's not as simple as you might think. There are a few restrictions and requirements to become one, which I will now list. Age: 18+ HAS BEEN LIFTED Forum Posts: >50 English: at least C1, can be B2 if last two points are convincing (refer to http://www.londonschool.com/level-scale/ to check your level) Knowledge of Lua: Above Beginner (will be tested during application process) Proof of Work: Required, must show a script you produced yourself (can be one you created from scratch) Why I should be a developer: At least 2 paragraphs of why I should choose you The reasons I've chosen such requirements are because I expect a certain maturity "emanating" from the applying developer. Age kind of speaks for itself. Forum posts signifies the sincerity with MTA (50 may seem a bit low, but I don't put that much weight into it anyway, it's just a general guideline). Your English must at least be Level 7 (C1 in CEF terms), however, it can be B2 (Level 6) if you have extensive knowledge of Lua, MTA and your proof of work is more than convincing. Refer to http://www.londonschool.com/level-scale/ to check what level your english is. Knowledge of Lua does not only encompass Lua itself, it also includes knowledge of MTA's functions and event system and how to properly use them, while proof of work has you show your actual understanding of Lua and MTA. It doesn't have to be your best script, it can be something you made from scratch and has some actual use. Send me a private message with your application. I'll try to answer as quickly as I can. If you have any questions, post them here. OLD TEXT:
  24. Send me a private message with an exact description of what you want, and I will create a script for you.
×
×
  • Create New...