Jump to content

Norbak

Member
  • Content Count

    141
  • Joined

  • Last visited

  • Medals

Posts posted by Norbak


  1. Try this in INIT.SQF:

    UsingLKscript = ["LKCOM","JOHN",PETER","Molly"]; //Only they can access the LKscript.

    if ( (!isServer) && (player != player) ) then {};

    if !(isnull player) then {

    if (vehicle player) in UsingLKscript then {

    Hint "you are allowed to use LK Script";

    nul = [player] execVM "lk\menu\close_menu.sqf";

    player addeventhandler ["Killed", {_this execVM "lk\var\lkcom_respawn.sqf"}];

    };

    coin setpos (getpos hq1d);

    coin setvariable ["BIS_COIN_rules", [LKCOM, JOHN, PETER, Molly],true]; // Only they have access to construction module.

    };

    But i'm not sure if that script is only built for LKCOM name. You should modify every script in this pack.

    * And if you want this LK script to work on a Multiplayer mission you will need more intense changes.


  2. Based on Reezo's Tauntspeaker. 2 questions:

    1) Why the enemy cars/tanks (LandVehicles) aren't being taunted?.

    2) Why the enemy men patrols aren't being taunted?. They are still walking without reaction. I know the script is working because a simple debug can say "Enemy EAST men incoming". But they don't do.

    * Another script is started before this executes. Not needed to know the previous script.

    private ["_object","_range","_caller","_id","_rnd","_influenceTaunt","_influenceEvacuate","_nearMen","_nearCars","_nearTanks","_enemyGroup","_name_evacuate","_name_taunt"];

    _object = _this select 0;

    _caller = _this select 1;

    _id = _this select 2;

    _range = (_this select 3) select 0;

    _influenceTaunt = (_this select 3) select 1;

    _influenceEvacuate = (_this select 3) select 2;

    _object removeaction _id;

    _object removeaction (_id + 1);

    reezo_loudspeaker_activateA2 = 1;

    publicVariable "reezo_loudspeaker_activateA2";

    reezo_loudspeaker_currentA2 = _object;

    publicVariable "reezo_loudspeaker_currentA2";

    sleep (random 10);

    _rnd = random 100;

    if (_rnd < _influenceTaunt) then {

    // MEN And Everything (only MEN working). Using "LAND" for everything selected.

    _nearMen = (getPos _object) nearObjects ["Land",_range];

    for [{_y = 0},{_y < (count _nearMen)},{_y = _y + 1}] do {

    if (EAST getFriend WEST < 0.5 && side (_nearMen select _y) == EAST && (_nearMen select _y) == leader group (_nearMen select _y)) then {

    _rnd = random 100;

    if (_rnd < _influenceTaunt) then {

    _enemyGroup = group (_nearMen select _y);

    _enemyGroup addWaypoint [getPos _object, 0];

    [_enemyGroup, 0] setWaypointType "SAD";

    [_enemyGroup, 0] setWaypointBehaviour "AWARE";

    };

    };

    };

    };

    //END


  3. My problem is simple (or not). I'm using Reezo's Loudspeaker (Taunt version) Script and working fine with units spawned in editor, but not with units using an external script to spawn enemies (such as Xeno's Domination! map).

    I can't find the wrong file to get it to work.

    // INIT

    private ["_object","_range","_caller","_id","_rnd","_influenceTaunt","_influenceEvacuate","_nearMen","_nearCars","_nearTanks","_enemyGroup","_name_evacuate","_name_taunt"];

    _object = _this select 0;

    _caller = _this select 1;

    _id = _this select 2;

    _range = (_this select 3) select 0;

    _influenceTaunt = (_this select 3) select 1;

    _influenceEvacuate = (_this select 3) select 2;

    [Charlie_7,nil,rPlaysound,"loudspeaker_taunt02"] call RE;

    sleep 0.2;

    Hintsilent "Taunt in progress:\nMaybe the enemies around 500m are looking for you at this moment.";

    _object removeaction _id;

    _object removeaction (_id + 1);

    reezo_loudspeaker_activateC7 = 1;

    publicVariable "reezo_loudspeaker_activateC7";

    reezo_loudspeaker_currentC7 = _object;

    publicVariable "reezo_loudspeaker_currentC7";

    sleep (random 10);

    _rnd = random 100;

    if (_rnd < _influenceTaunt) then {

    if (reezo_loudspeaker_debugC7) then { player globalChat "REEZO_loudspeaker DEBUG: TAUNT WORKED" };

    _nearMen = (getPos _object) nearObjects ["Man",_range];

    for [{_y = 0},{_y < (count _nearMen)},{_y = _y + 1}] do {

    if (EAST getFriend WEST < 0.5 && side (_nearMen select _y) == EAST && (_nearMen select _y) == leader group (_nearMen select _y)) then {

    _rnd = random 100;

    if (_rnd < _influenceTaunt) then {

    _enemyGroup = group (_nearMen select _y);

    _enemyGroup addWaypoint [getPos _object, 0];

    [_enemyGroup, 0] setWaypointType "SAD";

    [_enemyGroup, 0] setWaypointBehaviour "COMBAT";

    if (reezo_loudspeaker_debugC7) then { player globalChat "REEZO_loudspeaker DEBUG: INCOMING EAST ENEMY MEN" };

    };

    };

    if (RESISTANCE getFriend WEST < 0.5 && side (_nearMen select _y) == RESISTANCE && (_nearMen select _y) == leader group (_nearMen select _y)) then {

    _rnd = random 100;

    if (_rnd < _influencTaunt) then {

    _enemyGroup = group (_nearMen select _y);

    _enemyGroup addWaypoint [getPos _object, 0];

    [_enemyGroup, 0] setWaypointType "SAD";

    [_enemyGroup, 0] setWaypointBehaviour "COMBAT";

    if (reezo_loudspeaker_debugC7) then { player globalChat "REEZO_loudspeaker DEBUG: INCOMING GUERRILLA ENEMY MEN" };

    };

    };

    };

    _nearCars = (getPos _object) nearObjects ["Car",_range];

    for [{_y = 0},{_y < (count _nearCars)},{_y = _y + 1}] do {

    if (EAST getFriend WEST < 0.5 && side (_nearCars select _y) == EAST && (_nearCars select _y) == leader group (_nearCars select _y)) then {

    _rnd = random 100;

    if (_rnd < _influenceTaunt) then {

    _enemyGroup = group (_nearCars select _y);

    _enemyGroup addWaypoint [getPos _object, 0];

    [_enemyGroup, 0] setWaypointType "SAD";

    [_enemyGroup, 0] setWaypointBehaviour "COMBAT";

    if (reezo_loudspeaker_debugC7) then { player globalChat "REEZO_loudspeaker DEBUG: INCOMING EAST ENEMY CARS" };

    };

    };

    if (RESISTANCE getFriend WEST < 0.5 && side (_nearCars select _y) == RESISTANCE && (_nearCars select _y) == leader group (_nearCars select _y)) then {

    _rnd = random 100;

    if (_rnd < _influenceTaunt) then {

    _enemyGroup = group (_nearCars select _y);

    _enemyGroup addWaypoint [getPos _object, 0];

    [_enemyGroup, 0] setWaypointType "SAD";

    [_enemyGroup, 0] setWaypointBehaviour "COMBAT";

    if (reezo_loudspeaker_debugC7) then { player globalChat "REEZO_loudspeaker DEBUG: INCOMING GUERRILLA ENEMY CARS" };

    };

    };

    };

    _nearTanks = (getPos _object) nearObjects ["Tank",_range];

    for [{_y = 0},{_y < (count _nearTanks)},{_y = _y + 1}] do {

    if (EAST getFriend WEST < 0.5 && side (_nearTanks select _y) == EAST && (_nearTanks select _y) == leader group (_nearTanks select _y)) then {

    _rnd = random 100;

    if (_rnd < _influenceTaunt) then {

    _enemyGroup = group (_nearTanks select _y);

    _enemyGroup addWaypoint [getPos _object, 0];

    [_enemyGroup, 0] setWaypointType "SAD";

    [_enemyGroup, 0] setWaypointBehaviour "COMBAT";

    if (reezo_loudspeaker_debugC7) then { player globalChat "REEZO_loudspeaker DEBUG: INCOMING EAST ENEMY TANKS" };

    };

    };

    if (RESISTANCE getFriend WEST < 0.5 && side (_nearTanks select _y) == RESISTANCE && (_nearTanks select _y) == leader group (_nearTanks select _y)) then {

    _rnd = random 100;

    if (_rnd < _influenceTaunt) then {

    _enemyGroup = group (_nearTanks select _y);

    _enemyGroup addWaypoint [getPos _object, 0];

    [_enemyGroup, 0] setWaypointType "SAD";

    [_enemyGroup, 0] setWaypointBehaviour "COMBAT";

    if (reezo_loudspeaker_debugC7) then { player globalChat "REEZO_loudspeaker DEBUG: INCOMING GUERRILLA ENEMY TANKS" };

    };

    };

    };

    };

    //END


  4. AdminList = ["xxxxxxxxxx","xxxxxxxxx2"];

    if ((getPlayerUID player) in AdminList) then {

    _pl = _this select 0;

    action1 = _pl addaction [("<t color="#ccac00"">" + ("Punish Player") +"</t>"),"admin\pPlayer.sqf","",1,false,true,"","_this == vehicle player];

    };

    Is this correct?. Should this work fine and only the admin could use this option?. Or isn't it resctricted?.

    Or maybe the mistake is in this>>>

    "_this == vehicle player"
    ?

  5. It's a simple question. How to make a Guard Zone using a trigger in Multiplayer and when everyone is teleported there in he gets 1 script exectuted.

    Damn. It's so simple i can't get find the answer.

    ---------- Post added at 15:20 ---------- Previous post was at 14:17 ----------

    I thought making :

    Trigger 25 meters Axis A and B.

    Activation : Present, BLUFOR, REPEAT

    Condition:

    this && local player

    On ACT:

    nul = [player] execVM "Punish.sqf"

    But nothing happens when somebody is teleported there in.


  6. Why don't you make a trigger in Editor and:

    Condition :

    (local player) && {alive player} && (daytime > 19 AND daytime < 5)

    OR

    (local player) && {(vehicle player) in [sold1,sold2,sold3,sold4,sold5,sold6]} && {alive player} && (daytime > 19 OR daytime < 5)

    On ACT:

    Player addWeapon "NVGoggles"

    On DEACT:

    player removeWeapon "NVGoggles"

    I don't know if it 'll work.

    Or try to change

    AddItem and RemoveItem
    for
    AddWeapon and RemoveWeapon

  7. Using Viba's Script ... but Something is wrong when it changes...:

    if (isServer) then {

    "relayPosMsg" addpublicvariableeventhandler {

    _arr = _this select 1;

    _source = _arr select 0;

    _destination = _arr select 1;

    receivePosMsg = _source;

    (owner _destination) publicvariableclient "receivePosMsg";

    };

    };

    sendMessage = {

    relayPosMsg = [player, (_this select 1)];

    publicvariableserver "relayPosMsg";

    {player removeaction _x;} forEach actions;

    [] spawn addLocAction;

    compilePlayerList = {

    actions = [];

    player removeAction action1;

    _action = player addAction ["Cancel", "actionHandler.sqf", "{player removeaction _x;} forEach actions; [] spawn addLocAction;",999,false,true,"","alive player"];

    actions = actions + [_action];

    {

    _text = format ["Get Player UID %1",name _x];

    _args = format ['[%1] spawn sendMessage;',_x];

    _action = player addaction [_text, "actionHandler.sqf", _args,999,false,true,"","alive player"];

    actions = actions + [_action];

    } forEach playableUnits;

    };

    "receivePosMsg" addpublicvariableeventhandler {

    _puid = getPlayerUID _x;

    hint format ["Player Name: %1\nPUID: %2", name _x, _puid];

    };

    addLocAction = {

    action1 = player addAction ["Get Player UID...", "actionHandler.sqf", "[] spawn compilePlayerList;",999,false,true,"","alive player"];

    };

    [] spawn addLocAction;

    };

    and

    //This in actionHandler.sqf in the mission folder:

    Call compile format ["%1", _this select 3];

×