Jump to content

d3lta

Member
  • Content Count

    422
  • Joined

  • Last visited

  • Medals

Posts posted by d3lta


  1. Hi guys, here my little script about reammo MBT:

    _gen   = _this select 0;
    _idmenu= _this select 2;
    _param = _this select 3;
    
    
    _Car 	 = _param select 0;
    _supveic = _param select 1;
    _type = typeOf _Car;
    
    
    
    if (((_Car distance _supveic) < 6) && alive _Car && alive _supveic) then
    {
    
    if ( (isEngineOn _Car ) || (isEngineOn _supveic) ) then
    {
    
    	hintSilent "Ambos os motores precisam estar desligados antes da manutenção se iniciar.";
    
    
    }
    else
    {
    	ec = effectiveCommander _Car;
    	if ( ec==player ) then
    	{
    
    		_gen removeAction _idmenu;
    		hintSilent "Iniciando manutenção geral do veículo. Aguarde.";
    
    
    		if (local _Car) then
    		{
    
    			hint "Reabastecendo e trocando peças com problemas.";
    			sleep 15;
    			//ec = effectiveCommander _Car;
    			_Car  setFuel 0;
    			_supveic setFuel 0;
    			sleep 5;
    			_Car  setDamage 0;
    
    			//_Car setVehicleAmmoDef 1;
    
    
    			// BLOCO ISOLADO DEVIDO A BUGS
    			_Car  setVehicleAmmo 0;
    			_Car addMagazineTurret ["2000Rnd_65x39_Belt",[0]];
    			_Car addMagazineTurret ["500Rnd_127x99_mag_Tracer_Red",[0,0]];
    			_Car addMagazineTurret ["SmokeLauncherMag",[0,0]];
    			{
    				_Car addMagazineTurret ["30Rnd_120mm_HE_shells_Tracer_Red",[0]];
    				sleep 0.1;
    				_Car addMagazineTurret ["32Rnd_120mm_APFSDS_shells_Tracer_Red",[0]];
    				sleep 0.1;
    			} forEach [0];
    			hint "Rearmando.";
    			sleep 15;
    
    			//_Car setVehicleAmmo   1; // torretas
    
    
    
    			hint "Manutenção completa";
    
    			_Car  setFuel 1;
    			_supveic setFuel 1;
    
    			[_Car,_supveic] call api_PermiteACM;
    
    		};
    	}
    	else
    	{
    		hint "Somente o comandante dentro do veículo pode autorizar o inicio da manutenção.";
    	};
    
    
    };
    
    }
    else
    {
    hintSilent "Você precisa de um veículo de manutenção próximo para iniciar o procedimento.";
    };;

    I have a small problem with script, I need to run it twice to reammo the MBT. Why this?

    Ps. I'm using a addaction to fire the script.

    Ps. I'm using a dedserver to test.

    Best regards


  2. But why not just use bis_fnc_mp?

    Delta_fnc_message = {
        [{hint "MEH MEH MEH MEH";},"BIS_fnc_spawn",true,false] spawn BIS_fnc_MP;
        // do stuff
    };
    
    player addAction ["Broadcast Message", {call Delta_fnc_message;}, [], 1, false, true, "", "_target == lidergeral"];
    

    YEAHHHHHH, I tested here now and bis_fnc_mp run's fine. THANKS A LOT Mariodu62, Iceman77 and Mikie Boy.

    Best regards!!

    :D:D:D


  3. Not sure what the problem is but....

    "FOCK_GHint" addPublicVariableEventHandler
     {
       private ["_GHint"];
      _GHint = _this select 1;
       hint format["%1", _GHint];
     };
    

    and

    // FOCK_GHint = "Hello everyone on the server except me!"; publicVariable "FOCK_GHint"; 
    
    

    works fine - the only person who this doesn't see the message is the player/machine that executed the broadcast command.

    maybe you need to explain more about what your trying to do or what code you are using.

    The main problem is using addPublicVariableEventHandler with addaction. When I use with radio trigger , no problem.


  4. Not quite sure what you're getting at. Even if hint is local, it should be broadcasted to clients because it's in a PVEH. In any case, good luck with your script.

    publicVariable "DisparadorDeEventoParaCliente"; and "DisparadorDeEventoParaCliente" addPublicVariableEventHandler does not broadcast to all clients?

    ---------- Post added at 11:28 AM ---------- Previous post was at 11:26 AM ----------

    try with bis_fnc_mp...

    hummm.. I will try.


  5. Please, what's wrong with this code?

    init.sqf

    
    task4 = player createSimpleTask ["tskc4"];
    task4 setSimpleTaskDescription ["Blah Blah Blah","Zamaks","Zamaks"];
    task4 settaskstate "Created";
    task4 setSimpleTaskDestination markerpos "obj4";
    
    
    hand1= leaderSoldier addaction ["Speak","missaook.sqf"];
    
    if (isServer || isDedicated) then
    {
    
    
    
    "DisparadorDeEventoGlobal" addPublicVariableEventHandler {
    
    localize "SERVER XXXXXXXXXXXXXXXXXXXXXX";   
    
    
           _NomeEvento = _this select 1 select 0;
           _ValEvento  = _this select 1 select 1;
    
    
           DisparadorDeEventoParaCliente = [_NomeEvento,_ValEvento];
    
           publicVariable "DisparadorDeEventoParaCliente";
       };
    
    
    }
    else
    {
    
      "DisparadorDeEventoParaCliente" addPublicVariableEventHandler {
           _params = _this select 1;
           _ne = _params select 0;
           hintSilent "MEH MEH MEH MEH";
       };
    
    
    };
    
    
    
    
    

    missaook.sqf <------ FIRED BY ADDACTION

    
    DisparadorDeEventoGlobal=["facaAlgo","1"];
    publicVariableServer "DisparadorDeEventoGlobal";
    

    Here, using the speak menu on leader, don't show nothing, no hintSilent, no log info... :butbut:


  6. make sure each client knows what the variable is prior to being transmitted across the network - (publicVariable);

    for example - in the init.sqf - you could have if (isnil objtFOXTROT) then {objtFOXTROT = 0};

    that way when each client loads in they will have access to the variable objtFOXTROT.

    Very crude explanation i know...sorry

    Thanks Mikie boy. But "isnil" isn't the problem, I tested. =( Is Arma3 introducing a new role security with addAction and publicvariable?

    Best regards.


  7. Hi masters,

    PublicVariable is failing when I use publicVariable. see:

    init.sqf:

    _actionId1 = lidergeral addAction ["<t color='#FF0000'>Falar</t>", { nul= [] execVM "FalarComLider.sqf" } ];

    FalarComLider.sqf

    objtFOXTROT=1;

    publicVariable "objtFOXTROT"; <-------- don't broadcast to others PC....

    What's the problem?

    obs 1.: I tested on dedicated (arma 3).

    best regards...

    D3lta


  8. Try downloading the directx redistributible and running it.

    http://www.microsoft.com/en-gb/download/details.aspx?id=35

    I revised the instalation of directx redistributible on Windows 8 and now Windows 8.1. No problems.

    Does it crash in the editor or in a specific mission?

    no mission specific. not in editor. menu yes but is rare.

    Are you playing multiplayer?

    single or multiplayer crashs too.


  9. Try using a tool called GPU-Z to see if your graphics card is being used when your machine is idle. If it is, it could be a bitcoin mining program causing your crashes.

    If it isnt, watch the temperatures as you play the game, if it goes over 80c, you've got a heat problem.

    Thanks Furret. My temperature during full rendering is 60-65 degrees. No bitcoin mining here, idle temps is low (30-40).

    ARMA 3 is the only game with problem here. :confused:

×