Jump to content

infection

Member
  • Content Count

    136
  • Joined

  • Last visited

  • Medals

Everything posted by infection

  1. I've looked around and I can't seem to find it, how can I add a respawn button delay so when you press escape you have to wait 30 seconds? and if possible with abort aswell.
  2. Introduction Hello there Arma community, I've now updated this with a much cleaner version. Arma2SQL Life is a way to save stats and variables in a life mission or any other mission but it would have to be reworked. I've always loved Life maps however one of the downsides is everyone is very protective of their code, map or in this case stat save. I wanted to create this for the community to use, share and further develop. The goal is to be simple yet effective, I hope I've achieved that, if not I will have to keep trying! I hope you will find these scripts useful for your server and community! IMPORTANT NOTICE: If you ran the old version, the SQL save functions and database have been updated, you will need to update your database with the latest SQL file to add procedures and change variable types, else the latest version will not work! Also, CBA is no longer needed. Documentation: http://infectiondg.github.io/ Requirements Arma2NET Arma2MySQL Table of content Installation Commands Known issues Credits 1.INSTALLATION Please create a backup of your mission before attempting to install! Place SQL-Scripts folder in your mission root folder. Add this code to your INIT.SQF file in a isserver if statement. [] call compile preprocessFileLineNumbers "SQL-Scripts\server\savefunc.sqf"; [] call compile preprocessFileLineNumbers "SQL-Scripts\server\serverevents.sqf"; Add this code to your INIT.SQF in a isclient or !dedicatedserver if statement. [] call compile preprocessFileLineNumbers "SQL-Scripts\client\savefunc.sqf"; [] call compile preprocessFileLineNumbers "SQL-Scripts\client\clientinit.sqf"; Open Description.ext and add this line. #include "SQL-Scripts\dialogs\dialogs.hpp" Run the life_DB.sql query in your mysql server, please note this documentation does not cover installation of Arma2NET or Arma2MySQL. Done! Any issues contact Infection/Linnet on the BI forums, preferably in the Arma2SQL Life Thread. 2.COMMANDS The default arguments follow from left to right in order. [Player] call DB_LOAD DB_LOAD calls the server to send a query to recieve your stats and send it back to you. Default argument: Player [Player, Int, Array, Array, Double] call DB_NEW DB_NEW inserts a new save in your database. Default arguments: Player, Bank, Inventory, License, Streetrep [Player, Int, Array, Array, Double] call DB_SAVE DB_SAVE updates all your variables and stats. Default arguments: Player, Bank, Inventory, License, Streetrep Additonal Commands [string, string] call C_HINT It hints in color. Default argument: Text, Hex color code [Array] call TO_ASCII TO_ASCII turns your two-dimensional arrays into a single array of ASCII. Default arguments: Inventory [string] call TO_ARRAY TO_ARRAY turns your single ASCII-filled array back into a two-dimensional array. Default arguments: ASCII-array 3.Known Issues Two-dimensional arrays cannot be passed to Arma2MySQL by default due to a bug with commas, the workaround is to use the TO_ASCII function, then passing the ASCII-array to Arma2MySQL. This is needed when passing the Inventory of a player due to it being a two-dimensional array. Stats might not load or save correct during high load. Car saving is not currently implemented due to being reworked. Eventhandlers work pretty well but I'm not sure if it's the most efficent way to go about it, going to be looking into it. Credits Thanks to firefly2442 for creating Arma2MySQL. Thanks to ScottNZ for creating Arma2NET. This was created by Infection/Linnet, anyone may use and modify it but I ask that you keep the credits and do not try to claim it as your own. Changelog Downloads GitHub: https://github.com/Infectiondg/Arma2SQL-LIFE Armaholic: http://www.armaholic.com/page.php?id=21852 //Armaholic might not be the most up-to-date version of Arma2SQL Life, after a recent update use github.
  3. Hello, I'm looking for a way to make it so you can use an item in your inventory, I downloaded Scorch's Inventory Items (http://www.armaholic.com/page.php?id=21689) and played around with it a bit. I looked at Dayz's Arma 2 code on how all the use actions were added and it was like this class ItemActions { class Use { text = $STR_texthere; script = "spawn function;"; }; }; I tried this with the bandage in the item pack class sc_bandage: ItemWatch { displayName = "Bandage"; count = 1; class ItemInfo { mass = 1; }; picture = "\scorch_invitems\images\bandage.paa"; descriptionShort = ""; class ItemActions { class Use { text = "Use Bandage"; script = "spawn item_hint;"; }; }; }; I had no luck so far tho, I tried looking at how first aid kits were done but no luck there either. Anyone got any idea how I can go about doing this?
  4. Hello, I've been working on a completely new life project, from the ground up because I felt I wanted to make something of my own and not just have the mass-produced ordinary life missions! So, I set out to find an idea I liked, I settled on the Mafia, in the 60's specifically, so I started to work on the scripts and UI, at the moment, I've got some basic features finished, I will provide a list below. Like I said, I want it to be set in the 60's which is the plan with no weaponry or vehicles past 1970. (This is a lot of work so if you wish to pitch in and create vehicles, weapons or models, just pm me!) I don't really know what else to say other than this is mostly a check for interest, to see if people like the idea or not, leave a comment below if you have any pointers or ideas! So before I show you some pictures of the work currently done, I will give you a list of what is done and what I hope to accomplish if I ever finish this! What I wish to accomplish: Cars and weapons from the 60's Custom map (Most likely won't happen) 60's Uniforms (Police etc) Mafia family's instead of gangs Several nationalities of families, you then get to weapon shipments containing weapons and you'll receive according to where your family is from. (Russians would get AK's etc.) I want gun trading to be a big part of obtaining guns your family does not have access to and to make money of-course. It was kind of hard to come up with stuff on the spot but I will keep adding things! What has been finished: Banks Money system Shops Save system Quest system Mafia families There's not much on the list yet and I can't give you a specific release date either because sometimes I work on it during all the free time I get and sometimes I might leave it hanging for a few weeks. Basically I work on it when I feel motivated to work on it, that might be a bad attitude but unfortunately it's the way I work! Either way, last but not least I have some thanks to give before showing you these pictures I'm talking about! Thanks to: Hem for working on 3D models and helping me out! Takistan Life: Revolution some of my code is based on their mission. Can't thank them enough! Like I said, I wouldn't expect it released any time soon, but I will keep making it, slow but steady. Forum: http://mafialife.net/ Development Blog: http://blog.MafiaLife.net If you wish to follow the development you can do so by checking out the github in my signature!
  5. infection

    [WIP] Mafia Life

    We are in search of a graphics designer for our logo. Knowledge of vector graphics is a requirement. More Info: http://mafialife.net/topic/2/in-search-of-a-graphics-designer Any other questions, you can PM me here or on our forums! I hope someone will be kind enough to help us out! Check out our new development blog over at http://blog.MafiaLife.net
  6. infection

    [WIP] Mafia Life

    In the latest update the web interface has also been implemented, not currently viewable on the website however here is a quick peak of it. http://i.imgur.com/QWmryj3.jpg You login with the details you registered with the first time you joined the server. The map shows all your current characters, though only if you possess a map. In the settings menu you can reset characters position, reset your entire profile, empty mailbox, and edit in-game settings. More options will be added later. The profile tab displays all your current gear and character statistics for each side. A statistics tab will most likely be added that will display server and personal statistics. Mailbox tab will also be added to browse in-game mail.
  7. infection

    [WIP] Mafia Life

    Latest update! I have added a mail system, you can send items with cash on delivery payments. Mails take 30 minutes to arrive and last one month, after that they are cleaned from the database. http://i.imgur.com/ZNxtmIO.jpg http://i.imgur.com/Cmkupo3.jpg The other updates are mainly server sided with more database optimization and script updates. For a full update you can check the GitHub.
  8. infection

    [WIP] Mafia Life

    There will be some form of territory that the families can fight over, I am not sure how I want it to work yet. Currently there is a designated mafia zone on the map. I have some new features to show today hopefully. I will update when I have a definitive answer regarding the territories.
  9. infection

    [WIP] Mafia Life

    The Mafia Life website now online! http://mafialife.net/ If you have any questions or suggestions feel free to leave them here or on the website. I hope to showcase some new features soon, I have been busy but hopefully some of them will be done.
  10. infection

    [WIP] Mafia Life

    Preview of the new item system, microphone was a bit low unfortunately. I hope you can give some feedback of what you think.
  11. infection

    [WIP] Mafia Life

    Hello, I have been on a slight hiatus from working on Mafia Life, not much done on the code, however I have added new items and new fonts to fit the mod better. New items: Rope Tyre iron Hammer Cocaine Wheel Bandages Boss' hat More will be added, note that all of these are inventory items and not actually weapons of any kind. Items such as a tyre iron or a hammer can be used to break someone's legs, these items will be counted as 'lethal' items and can be used for other functions. Some items that have been added are also for quests (Boss' hat), you will need to collect these to complete certain quests. Other than that, the code is still being worked on and right now I am tuning up the quest system to have better functionality and more diverse quests.
  12. infection

    [WIP] Mafia Life

    No, however the new Metro style one is more dynamic and allows for easier colour changes, it also makes it possible for users to customize their own UI colours.
  13. infection

    [WIP] Mafia Life

    I am currently reworking the UI, I need some input on what you guys would prefer. http://i.imgur.com/HFjSnym.jpg New version, based on the Metro UI in Windows, personally I like this more as it is more dynamic and smoother. http://i.imgur.com/AkUuVmz.jpg Old, it fits more and looks pretty decent, it can be improved to fit nicer and mix better with the environment. So, I would like your inputs on which one I should go for.
  14. infection

    [WIP] Mafia Life

    These prices are just for testing purposes.
  15. infection

    [WIP] Mafia Life

    Update time! Mostly been working on server-end code and saving however there are a few updates to client sided things that you would notice! Early version of the persistent Mafia Families, families will not be easy to create and there will be high requirements for them. http://i.imgur.com/ZGWJTIW.jpg Added filter to the vendor menu. http://i.imgur.com/AkUuVmz.jpg Registration upon first joining the map, this is because later on a web-based user interface will be available to reset your character, reset position, and view your gear on-line etcetera. http://i.imgur.com/9Y9l9jL.jpg Also a client sided extension has been added, it contains new logging functions for Mafia Life information, JSON reader for key binds, and RegEx checks for password and email inputs (Source available on GitHub).
  16. infection

    [WIP] Mafia Life

    First weapon preview! http://i.imgur.com/Zv3JpwG.jpg (108 kB) Still needs some work but it is getting there!
  17. infection

    [WIP] Mafia Life

    I have not been working a lot these past months, I have been doing small stuff here and there but here are some screenshots of the new quest system. http://i.imgur.com/TbPCxo0.jpg (487 kB) http://i.imgur.com/SRac6fQ.jpg (434 kB) New key system is also in place, allowing you to custom bind all the Mafia Life keys.
  18. infection

    [WIP] Mafia Life

    Yes, of-course the Tommy gun will be in! I hope to get as many guns popularized by the Mafia in as possible, as well as others of-course. Currently there isn't many updates that I can show off, right now I've been very busy for the past weeks but I've been working on stuff server side. I hope to bring you guys something new the coming week!
  19. infection

    [WIP] Mafia Life

    Been doing some small updates/work on interaction menu the past week. Nothing new visually though! Mainly script updates. Also have begun translating majority of text's into different languages (using Google translate which is probably not providing the most accurate translations), therefore if anyone knows any of the languages listed in the link below and notices something wrong, please pm or post here and I'll correct it! https://github.com/Infectiondg/ML_language/blob/master/stringtable.xml
  20. infection

    [WIP] Mafia Life

    Added a new preview of interaction menu I've been working on today, still in early phase, needs some more work to make it look pretty! http://i.imgur.com/cVk4qO8.jpg
  21. infection

    [WIP] Mafia Life

    Bystrica looks very cool, I will look into it. Thanks for your input!
  22. infection

    [WIP] Mafia Life

    Yeah, I agree, Altis is a pretty cool setting Map wise, unfortunately those solar panels and other futuristic looking buildings is the main reason I'd want a custom map, but the 3D models and Scripts alone are a lot of work, a map is no easy task. Hopefully I'll find a solution!
  23. We've started running this on Arma 2 Island life, works beautifully. Thank you again Torndeco, amazing work.
  24. Hello, I've ran into some problems with a script I have that recreates vehicle on server startup and gives them a varname, this is all done from the server, however once the clients load in, it's not the same as on the server. It's important that it's the same as the client calls the server for the object to be deleted. _tent setVehicleInit format[ " this setVehicleVarName '%1_Tent'; %1_Tent = this; this setDir %2; ", _uid, _roledir]; processInitCommands; now the processinitcommand is global, however I'm guessing the varname dosn't get set for new players that join, would anyone have a solution to this? Thanks.
×