Tuntemattoman skriptit

User avatar
Tuntematon
Posts: 2277
Joined: 19 May 2015, 15:29
Location: Valkeakoski
Contact:

Tuntemattoman skriptit

Postby Tuntematon » 12 Jun 2018, 19:19

Koitan kerätä tänne omia scriptejäni joita teen.

Siviili tappo laskuri[+] Spoiler
Scripti joka laskee jokaisen siviili tapon ja ilmoittaa jos pelaaja tappaa siviilin. Scriptissä on muuttuja tappajan sidestä ja mille sidelle tulee ilmoitus.

Code: Select all

["Man", "Killed", {
   params ["_unit" ,"_killer"];

    if ((side _unit) == civilian) then {

        //Make sure we get right killer or last unit that damaged civilian
          _killer = _unit getVariable ["ace_medical_lastDamageSource", _killer];

          // Suicide is not cool
          if (_killer != _unit) then {


              //Here you can choose target for notification. Array of any of following types: Group, Side, Object or number (more info in targets https://community.bistudio.com/wiki/remoteExec)
              _notification_side = [west, east, resistance, civilian];
              //Here you choose what side killer need to be to create notification
              _killer_side = [west, east, resistance, civilian];


              //Count killed civilians for all players
              if ((side _killer) in _killer_side) then {
                  _civilian_kills = _killer getVariable ["TUN_count_civilian_kills", 0];
                  _civilian_kills = _civilian_kills + 1;
                  _killer setVariable ["TUN_count_civilian_kills", _civilian_kills, true];

                  (format ["%1 killed a civilian!\n%1 has now killed at least %2 civilian(s)", name _killer, _civilian_kills]) remoteExec ["hint", _notification_side];
              };
          };
    };
}, true, [], true] call CBA_fnc_addClassEventHandler;

Return to “Scriptit”



Who is online

Users browsing this forum: No registered users and 1 guest