Jump to content

Superkaj

Member
  • Content Count

    3
  • Joined

  • Last visited

  • Medals

Community Reputation

1 Neutral

About Superkaj

  • Rank
    Rookie
  1. Hey Everyone! I am quite new here, but i have already been highly impressed by the community here, very helpful! So, i have already been scripting in my missions in Arma 2 OA. But i stumpled upon a problem... I have been trying to find/make a script that would count the kills of a certain unit or side (The side only has one unit) so that the whole server would notice how many kills the unit has. I have been trying with this code and it seemed to work well, that is until i tried in multiplayer with my friends and it only seemed to count my deaths and not the others at all. Here is the code: // Global variable to hold the death counter. DeadOPFOR = 0; // Function to display the death count. fnc_showOpDeathCount = { hintsilent format ["Sniper Kills: %1",DeadOPFOR]; }; // Server will do all the work. if isServer then { // Function to update death counter. fnc_countOpDeaths = { DeadOPFOR = DeadOPFOR + 1; // Send the new value to clients. publicvariable "DeadOPFOR"; // This machine is the server, but if it's not dedicated, then it's a // listen server, which means it's also a client, who needs to see the // hint as well. if !isDedicated then { call fnc_showOpDeathCount; }; }; // Add killed -eventhandler to all opfor. { if (side _x == EAST) then { _x addEventhandler ["killed",fnc_countOpDeaths]; }; } foreach allUnits; // Non-host clients. } else { // PublicVariable eventhandler to catch the update sent by the server. "DeadOPFOR" addPublicVariableEventHandler {call fnc_showOpDeathCount}; }; The code i want to do is to count all the deaths by the Opfor, it works for me (The Host) but the others aint getting counted on death. Any Ideas?
  2. Great it worked! Thanks, finally we will be able to call down the cargo with an actually usable cargo hehe.
  3. Hey i just tried out your script for the cargo drop, and it worked great! But i stumbled upon a problem... When the cargo lands in the parachute it simply dosent work when i try to equip or take some of the gear. I tried to place the crate right infront of me, and i could take and drop gear. But as soon as the cargo ends up in the parachute and lands, it simply wont allow me to take the gear. I can look into it and the rearm option is even there, but nothing happens with the "take" button. Sorry for replying to such an old thread. Looking forward for an answer, in the mean time ill play around with it!
×