Jump to content

Hotfixx

Member
  • Content Count

    6
  • Joined

  • Last visited

  • Medals

Everything posted by Hotfixx

  1. I am adding items to a crate but it doesn't seem to be working? I think I'm doing thing's right? https://hastebin.com/sufozijonu.lua Anybody got any input why this isn't working?
  2. I am trying to learn SQF as fast as I can, and I'm making a script which uses as many constructs as I think of. I am trying to make a script which communicates between two multiplayer players. I am making a script on where one player puts the items in a crate, they click send, then it spawns in front of the other player. However, I was considering the logic of the code and I can't test it under a multiplayer environment, so I was wondering if somebody could consult with me here. if (getPlayerUID player != tradingPerson ) then { hint "Trade Finished!"; } else { supplyBoxGiveBack = "DSR_Object_Storage_Small" createVehicleLocal position player; The reason I doubt the logic of this code, is that it is executed via addAction and I believe the code is only going to check if that individuals players UID and proceed with the if statement accorindgly. In other words, I don't think the crate will spawn in front of the other player because the script has only been executed by one player, and it is checking whether that player has that UID or not? Any solicitation would be great on how to move forward on this, if I am wrong. I am very interested in making scripts for Arma 3, as I have put 1500 hours into the game now. I am sorry if this bothers anybody by this question! Hotfix = )
  3. Hotfixx

    Respawn with Same Gear

    I think this is more of a question for the Altis Life forums, however, I believe you could create a trigger on where the player dies on the cop side, it will log that players gear via commands such as getItem and the playerID of that player, then use addUniform on the presence that they are alive. In other words, log the players uniform on death, and then however Altis Life handles character creation, slip in a script that adds the previous uniform to the player. There is an actual Altis Life discord on their website with a support channel, those guys work very hard to help people like you and I recommend consulting with them further. This might have not been of any help if you do not have any scripting knowledge, but I'm sure the guys at Altis Life will be able to help you to a great extent!
  4. Just got a question about variables: When you change a variable, does it execute on the client and only the client, or does it broadcast globally and across a full server. For instance, if I was to do "variable = 1" would it equal to one for everybody, or just that player? - Hotfix
  5. Just impemented this now as it seems to work! I didn't know you could declare each index of the array with params, and I'll be sure to make use of "count" in the future! Thank's for helping a newbie out! +1 for Das Attorney!
  6. Hi all, I'm just posting to see if anyone could give some helpful advice on how I could fix a little problem that I am having! :) I am currently creating a script that copy and pastes the content of a crate into another one. I am making use of the getItemCargo and addItemCargo scripting commands in order to achieve this. I am storing the getItemCargo in a variable, for example: variableItems = getItemCargo cursorTarget; This returns an array of items that looks like this: [["30Rnd_556x45_Stanag","Chemlight_blue"],[3,1]] However I am unable to add the items succesfully to the other crate with the supplyBox addItemCargo [variableItems]; This does not add the items to the create though and I think the reason behind this is because the actual command is split into [item, count] and is not just one array. From an analytical standpoint, I think the best point forward is to split the array, but here's the thing, I don't know how. This mean's I would split ["30Rnd_556x45_Stanag","Chemlight_blue"] into a variable item, and [3,1] into count. I tried the select command but I think I am using it wrong because the full array returns. I am fairly new to SQF and have been making good use of the wiki, but if someone could give a snippet of code on how to split this array into two variables, that would be fantastic! - Hotfix =)
×