Jump to content

raptor2x

Member
  • Content Count

    48
  • Joined

  • Last visited

  • Medals

Everything posted by raptor2x

  1. Hello, With the help of other existing post on the forum, I created a countdown in the init.sqf file of my mission. It's working good, but I would like to do something when the countdown reach 0. In fact, I would like to restart the server. Not the mission, the server (it's going to be on my dedicated server). How can I do that ? if(_time < 1) then { DO SOMETHING TO RESTART THE SERVER HERE }; Thanks !
  2. Hello, So basically I'm trying to do something when a player fires with a mortar. This is a simple code I made to check if it's working when the player fires with a MK18, and it's working good: player addEventHandler ["Fired",{ if (_this select 1 == "srifle_EBR_F") then { do something here };}];So now I'm trying to adapt the code for the mortar, this is what I tried :player addEventHandler ["Fired",{ if (_this select 1 == "mortar_82mm") then { do something here };}];It's not working and I probably know why "This EH will not trigger if a unit fires out of a vehicle. For those cases an EH has to be attached to that particular vehicle.", the mortar is a vehicle. So from what I understand I need to attach the Event Handler to the vehicle and not to the player itself. Can you explain me how can I do that ? Thank you !
  3. Hello, So basically I have a dialog where the player can enter a text. Then I save this text in my database. It's working good but if the player puts the character ":" inside his text, the query will understand as if it was a new input (I don't know if I'm expressing myself correctly, sorry). Here is the log so you will understand what I'm saying : [14:44:50:842 +02:00] [Thread 4856] extDB2: SQL_CUSTOM_V2: Incorrect Number of Inputs: Input String addOpinion:76561198028528740:Raptor:this is a wonderful test :) [14:44:50:842 +02:00] [Thread 4856] extDB2: SQL_CUSTOM_V2: Incorrect Number of Inputs: Expected: 3 Got: 4 [14:32:36:478 +02:00] [Thread 4856] extDB2: SQL_CUSTOM_V2: Incorrect Number of Inputs: Input String addOpinion:76561198028528740:Raptor:: [14:32:36:478 +02:00] [Thread 4856] extDB2: SQL_CUSTOM_V2: Incorrect Number of Inputs: Expected: 3 Got: 4 [14:50:00:276 +02:00] [Thread 3028] extDB2: SQL_CUSTOM_V2: Incorrect Number of Inputs: Input String addOpinion:76561198028528740:Raptor:test 2 : : : : : : : [14:50:00:276 +02:00] [Thread 3028] extDB2: SQL_CUSTOM_V2: Incorrect Number of Inputs: Expected: 3 Got: 10 So what should I do to force the character not be considerated as a new input ? private ["_answerAuthorID", "_answerAuthorName", "_answerText"]; _answerAuthorID = _this select 0; _answerAuthorName = _this select 1; _answerText = _this select 2; [format ["addOpinion:%1:%2:%3", _answerAuthorID, _answerAuthorName, _answerText]] call extDB_Database_async; Thank you !
  4. Yep, the problem is that I'm a beginner so I don't know how to do that exactly. That's not a big big problem so I think that I will just try to warn the player if he writes ":".
  5. Like that ? private ["_answerAuthorID", "_answerAuthorName", "_answerText"]; _answerAuthorID = _this select 0; _answerAuthorName = _this select 1; _answerText = _this select 2; _textArray = []; _textArray pushBack _answerText; [format ["addOpinion:%1:%2:%3", _answerAuthorID, _answerAuthorName, _textArray]] call extDB_Database_async; It gives But the problem is the same with ":" [17:56:57:934 +02:00] [Thread 5564] extDB2: SQL_CUSTOM_V2: Incorrect Number of Inputs: Input String addOpinion:76561198028528740:Raptor:[":"] [17:56:57:934 +02:00] [Thread 5564] extDB2: SQL_CUSTOM_V2: Incorrect Number of Inputs: Expected: 3 Got: 4 [17:57:37:105 +02:00] [Thread 5564] extDB2: SQL_CUSTOM_V2: Incorrect Number of Inputs: Input String addOpinion:76561198028528740:Raptor:["qsdqsdqds qs :"] [17:57:37:105 +02:00] [Thread 5564] extDB2: SQL_CUSTOM_V2: Incorrect Number of Inputs: Expected: 3 Got: 4 What am I supposed to do with onChar ? Thanks guys !
  6. Thanks for your help guys. So there is no way to have this character in a normal text in the database ? We must prevent the player from writing it ? Btw, is ":" the only character that can't be used ?
  7. Hello, I'm using style = "16" because I want to show text on multiple lines, it's working good but there is a little problem : This grey area border that dissapears when you click on an other UI element but then reappers if you click back on the text. Any idea if we can remove this ? Thanks !
  8. Yep, it's also working ! Thank you ! :-)
  9. You really know everything about GUI on Arma 3 ! :D Thank you very much for your help.
  10. Thank you so much for your help hoverguy ! Now it works perfectly. :)
  11. Hello, Ok so my problem is easy to understand and I think that it is also easy to resolve. To explain that quickly, here is my code : _userUID = getPlayerUID player; _alreadyAnswered = [format ["getAnswerAuthor:%1", _userUID], 2] call extDB_Database_async; systemChat format ["%1", _alreadyAnswered]; if(_alreadyAnswered == what can I write here ?) then { blablabla } else { blablabla }; And here is the SQL code referring to "getAnswerAuthor" : [getAnswerAuthor] SQL1_1 = SELECT COUNT(*) FROM sondages WHERE UID = ?; Prepared Statement Cache = false Number of Inputs = 1 SQL1_INPUTS = 1 So the SQL query just checks if there is the UID of the player in the "sondages" table, then it returns 1 or 0 in alreadyAnswered. It's actually working well, when I check what's the result with systemChat format ["%1", _alreadyAnswered]; , it says in the chat [0] or [1]. But the problem is that I want to do something with this [1] or that [0], as you can see at the line 5. I don't know how I can do that because it's not a simple true/false or a 1/0, there are the "[]" next to the number. So basically how can I do that if(_alreadyAnswered == [1]) ? Thanks !
  12. This is exactly what I was looking for, ctrlShow is doing the job. Thank you very much killzone_kid !
  13. Hello, I will try to explain that quickly : I made a dialog with some buttons, text and images. I would like to know if it is possible to remove one element from the dialog when I click on one of the button. So let's imagine a window with 2 images in it and 2 buttons in it : one button to remove the image 1, one other to remove the image 2. Everything is in the same window . How can I do that ? I know about the function closeDialog idc, but it's not what I want because it closes everything. I tried the function with the idc of the element I want to remove, but it closes everything so I guess that I'm using this function wrong. I hope that you understand what I'm trying to do. Thank you ! :-)
  14. raptor2x

    Lockheed C-130

    Nice work sabre ! Glad to see that you already started to work on what we were talking about yesterday. :) Can we still close the ramp ?
  15. raptor2x

    Sukhoi Su-34

    Now with this update the mod is working perfectly with the laser-guided bombs, this is a masterpiece, one more time thank you very much for your work sabre ! If some of you are using the mod ACE, you will have to disable it (at least I had to) in order to use the guided bombs because ACE replace them with unguided ones, this is strange but @sabre will probably do something to prevent that. :)
  16. raptor2x

    United States Air Force( 2015)

    Thank you very much for your amazing work ! This mod pack is just wonderful.
  17. raptor2x

    Sukhoi Su-34

    Hello, I downloaded the mod today and tested it, it looks really good, you did a good job ! However, it looks like I can't lock the guided bombs on the laser, when I press T it doesn't do anything. Do you have any idea why ? Already tried many times with different angles.
  18. Yes I need to read about the clientside & serverside, do you have any link of tutorial which can help me ? How can I make a server side file with a script that get launch when the mission start (and restart). Here is my init.sqf for you can see how I did the script. https://mega.co.nz/#!58k0WYRb!fSrSbxA_cZftWd8XFL8in1rOfZ0j8w1DcZaZjvPNYMs Yes, so I need to use "_myPass serverCommand "#restart";" but I have the other problem with the file that is not found. Maybe it's because of init.sqf.
  19. Do you mean client side and server side ? So it means that the file where I put my script is client side ? And do you have any idea how I can fix that : Anyway, thank you for your help.
  20. Yes it's on a dedicated server (gtxgaming). But the systemChat works good.
  21. The script is inside init.sqf ---------- Post added at 13:41 ---------- Previous post was at 12:02 ---------- Even with that script it doesn't works. But the test message works. ---------- Post added at 14:42 ---------- Previous post was at 13:41 ---------- Well it's working great with this script : But the problem is that after the mission restart, the countdown does not restart. I want the countdown to restart again and again after the mission restart, do you know what I mean ?
  22. Thanks for the answer. Yes, the folders and the file are in the main folder of the server, right here : http://i.gyazo.com/5a39ef65e7f9adc4a4fb2cb0a4e4f8f9.gif Then in my script : if(_time < 2) then { _myPass = call compile preprocessFileLineNumbers "\userConfig\myPass\myPass.hpp"; _myPass serverCommand "#restart"; }; And in the myPass.hpp file : (I will change it so doesn't matter if you see it right now) I know about the #restart command, this is finally what I want. How can I check that ? server.cfg ?
  23. Hello, thanks for the help but it doesn't work. When the countdown reach 0 and when it's supposed to do _myPass = call compile preprocessFileLineNumbers "\userConfig\myPass\myPass.hpp"; _myPass serverCommand "#restart"; I got this : myPass.hpp is right here, in the server root : Any idea of what is the problem ?
  24. I think that I will do something different. My dedicated server restarts every 12 hours (it's an option on the hoster website). In my mission script I will just set the countdown to 12 hours (43200 seconds), and normally it should be sync with the delay of restart of the server. But maybe there is a difference between the starting time of the countdown of the server and the one of the mission ? Like some seconds, idk.
×