Jump to content

juandayz

Collaborator
  • Posts

    2098
  • Joined

  • Last visited

  • Days Won

    144

Posts posted by juandayz

  1. Just now, DAmNRelentless said:

    The mission_winorfail file just holds the information what happens if the mission is cleared by whatever. To include the playername into the name, you have to add the same part in the mission_init where the marker name is setup.

    hey dam what do think about this:

    a lil modify into the loop block  in mission_init.sqf

    Spoiler
    
    while {_running} do {
    
    				_type	= (wai_mission_data select _mission) select 1;
    				
    				if (ai_show_remaining) then {
    				_airemain	= (wai_mission_data select _mission) select 0;
    				_text	= format["%1 [%2 Remaining]",_name,_airemain];
    				} else {_text = _name};
    
    				_marker 		= createMarker [_type + str(_mission), _position];
    				_marker 		setMarkerColor _color;
    				_marker 		setMarkerShape "ELLIPSE";
    				_marker 		setMarkerBrush "Solid";
    				_marker 		setMarkerSize [300,300];
    				_marker 		setMarkerText _text;
    
    				_dot 			= createMarker [_type + str(_mission) + "dot", _position];
    				_dot 			setMarkerColor "ColorRed";
    				_dot 			setMarkerType "mil_dot";
    				//////////////####MODIFY############################################////////
                   {if((isPlayer _x) && (_x distance _position <= 1000)) then {
    				
    				_playerName = name _x;
    				_dot 			setMarkerText _playerName;
    				}else{
    				_dot 			setMarkerText _text;
    				};
                    }forEach playableUnits;
                   
                    //////////////####END MODIFY############################################////////
    				sleep 1;
    
    				deleteMarker 	_marker;
    				deleteMarker 	_dot;
    
    			   _running = (typeName (wai_mission_data select _mission) == "ARRAY");
      
    			};

     

     

  2. @totis  not sure cuz cannot test,, but in a quick look..

    check this line in WAI/compile/mission_winorfail.sqf

    {
    			if((isPlayer _x) && (_x distance _position <= wai_timeout_distance)) then {
    				_player_near = true;
    			};
    			
    		} count playableUnits;

    see an example below:  (Note: this line is into a loop and its not a good idea put a text into a loop but for an example its fine).

    {
    			if((isPlayer _x) && (_x distance _position <= wai_timeout_distance)) then {
    				_player_near = true;
    				_playerName = name _x;
                    [nil,nil,rTitleText,format["Mission Claimed by %1",_playerName], "PLAIN",10] call RE;
    			};
    			
    		} count playableUnits;

     

  3. @nova

    For example: If u put the msg.sqf into Your Server Root/Mpmissions\Your instance\msg\

    then  open your init.sqf and find:

    execFSM "\z\addons\dayz_code\system\player_monitor.fsm";

    just below paste:

    execVM "msg\msg.sqf";

    *NOTE: if u wanna use dynamicText function then into msg.sqf

    //find:
    
    systemChat format["%1 %2",_chattxt,_randmsg];
    
    //change by:
    
    [format["<t size='0.5' color='#D01000'>%1</t><br/><t size='0.5'>%2</t>",_chattxt,_randmsg],0,0,2,2] spawn BIS_fnc_dynamicText;	

    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

     

    Another way to make something similar, without externals scripts is using the motd line located in your : serverRoot\your instance\ config.cfg

    this line:

    motd[] = {"DayZ Epoch","Have fun!"};
    motdInterval = 0;

    then change this line by:

    motd[] = {
    "My first Msg",
    "My second Msg",
    "My 3 Msg",
    "My 4 Msg"//last line without ","
    };
    motdInterval = 120;//time in seconds between each msg.

     

  4. Just now, totis said:

    Normal missions Juan to be auto claimed by players name on map (next to mission name preferably.

    Would be handy in a pve server that all are fighting to have a mission :)

    Tnx for helping m8.

    That would work for a static mission though am i right?

     

    send me by private msg the code of your mission , to see around.

  5. @totis i dont know what kind of code uses that mission that youre talking about , but basically  is something like this:

    waitUntil{{isPlayer _x && _x distance _Your_Mission_Location_Variable_Here <= 1000  } count playableunits > 0};
    _playerName = name _x;
    [nil,nil,rTitleText,format["Mission Claimed by %1",_playerName], "PLAIN",10] call RE;

     

  6. @ViktorReznov nice progress !!!! you can take some block of code from my "find items on wrecks" if u need spawn the parts over the ground and not into a crate. Also set a variable on the vehicle if u want not allow futures dismantles over the same vehicle. Any way good work viktor keep doing mods like this and your awesome fluctuating economy!!!!!

  7. @ViktorReznov   hey mate just a doubt.. scuse me cuz maybe cannot understand your code.. but do you belive if is possible use one sigle file for all of this?

    for example in this line of

    scraptastic.sqf
    if (_vehClass in VRapvs) then {
      _chance = random 100;
      if (_chance >= 40) then {
        [_vehClass] ExecVM "scripts\scrapper\GlobalScrap.sqf";
        call _fn_del_vehicle;
        systemChat("Successfully scrapped vehicle, usable parts are in that crate!");
      } else {
        call _fn_dmg_veh;
        systemChat("Be careful! You just damaged your vehicle!");
      };
    };

    can you replace it by something like:

    Spoiler
    
    
      _chance = random 100;
      if (_chance >= 40) then {
        [_vehClass] ExecVM "scripts\scrapper\GlobalScrap.sqf";
        call _fn_del_vehicle;
        systemChat("Successfully scrapped vehicle, usable parts are in that crate!");
      } else {
        call _fn_dmg_veh;
        systemChat("Be careful! You just damaged your vehicle!");
      };
    

     

    then create a new sqf.. GlobalScrap.sqf

    Spoiler

    use the same locals _variables for each veh class  and put statements if some others vehicles uses diferents parts. example

    private["_dir","_pos","_spawnCrate","_randFlip","_randLow","_randMid","_player","_type"];

    _vehicle = _this select 3;
    _vehClass = typeOf _vehicle;


    if (_vehClass in VRapvs ) then {
    _VRApcParts = [["PartGeneric","1"],["PartWheel","1"],["PartEngine","1"],["PartFueltank","1"],["PartGlass","1"]];
    }else{
    if (_vehClass in VRquads) then {
    _VRApcParts = [["PartEngine","1"],["PartFueltank","1"],["PartGlass","1"]];
    };
    };


    //containers for our random vars so we can insert into an array as whole figure for that effin workaround
    _randFlip = floor((random 5)/2);
    _randLow = floor(random 8);
    _randMid = floor(random 10);

    //setting the number of each part to add
    _VRApcParts select 0 set [1,_randMid];
    _VRApcParts select 1 set [1,_randLow];
    _VRApcParts select 2 set [1,_randFlip];
    _VRApcParts select 3 set [1,_randFlip];
    _VRApcParts select 4 set [1,(_randFlip + 1)];

    _player = player;

    _type = _this select 0;

    // Name of this crate
    _crateName = "Scrap Crate";

    // Crate type. Possibilities: MedBox0, FoodBox0, BAF_BasicWeapons, USSpecialWeaponsBox, USSpecialWeapons_EP1, USVehicleBox, RUSpecialWeaponsBox, RUVehicleBox, etc.
    _classname = "USOrdnanceBox";

    // Location of player and crate
    _dir = getdir _player;
    _pos = getposATL _player;
    _pos = [(_pos select 0)+1*sin(_dir),(_pos select 1)+1*cos(_dir), (_pos select 2)];

    //actually spawn the crate
    _spawnCrate = _classname createVehicleLocal _pos;    
    _spawnCrate setDir _dir;
    _spawnCrate setposATL _pos;


    //clear crate before filling it
    clearWeaponCargoGlobal _spawnCrate;
    clearMagazineCargoGlobal _spawnCrate;
    clearBackpackCargoGlobal _spawnCrate;

    //fill it with this crap. freaking workaround looks terribly ugly and prolly slow as crap but wont populate if structured ["PartGeneric", (0 + floor(random 3))];
    _spawnCrate addMagazineCargoGlobal [(_VRApcParts select 0) select 0, (_VRApcParts select 0) select 1];
    _spawnCrate addMagazineCargoGlobal [(_VRApcParts select 1) select 0, (_VRApcParts select 1) select 1];
    _spawnCrate addMagazineCargoGlobal [(_VRApcParts select 2) select 0, (_VRApcParts select 2) select 1];
    _spawnCrate addMagazineCargoGlobal [(_VRApcParts select 3) select 0, (_VRApcParts select 3) select 1];
    _spawnCrate addMagazineCargoGlobal [(_VRApcParts select 4) select 0, (_VRApcParts select 4) select 1];

    diag_log format["[SCRAPPER] %1 just scrapped %2, at location %3!",_player,_type,_pos];

     

  8. @totis   @DAKA or @someoneelse

    can you test it... if works i guess its gonna be a lil more better for your server performance using waituntil command at top of the loop.

    veh_hum.sqf

    private ["_vehicle","_driver","_humanity","_txt"];
    
    while {true} do {
    
    waitUntil {uiSleep 0.25;vehicle player != player};
    
    _vehicle = vehicle player;
    _driver = driver (vehicle player);
    
    	if (({(isPlayer _driver) && (alive _driver)} count (crew _vehicle) > 0)) then {
    		
    
    		_humanity = _driver getVariable["humanity",0];
    
    		if (typeOf _vehicle in DZE_heroHumanity && _humanity <= 20000 || (typeOf _vehicle in DZE_superHeroHumanity && _humanity <= 40000) || (typeOf _vehicle in DZE_agentHumanity && _humanity <= 60000)) then {
    			player action ["getOut", (vehicle player)];
    			titleText ["","WHITE IN"];
    			_txt = "<img image='addons\vehicon.paa' /><br/><t size='0.7' color='#ea2828' align='center'>prohibited vehicle</t>";
                [_txt, [safezoneX, safezoneW], [0.20 * safezoneH + safezoneY, 0.3 * safezoneH], 2, 0.5] spawn BIS_fnc_dynamicText;
    		};
    	};
    
    sleep 3;
    };

     

  9. Just now, _Lance_ said:

    I thought I had posted back to this but the satchel charge door script still worked with indestructible buildings, god mode bases turned on, and vault hotwiring running, the only issue I'm having is when I added "itemHotwireKit" to my config traders it shows up as a blank spot in the list and when players buy it they get nothing. Any ideas on what might be going on there? Here's the entry from configtraders:

        class ItemHotwireKit {
            type = "trade_weapons";
            buy[] = {20000,"worth"};
            sell[] = {10000,"worth"};
        };    

     

    It's like there's a setting blocking it or something

     

    mmm not sure if is  type = "trade_items";  or type ="trade_weapons".    try with   " trade_items"

     

  10. @totis  in the way that I propose you.. would you have to use a loop

    but remember its just a dirt idea .

    hum_veh.sqf

    Spoiler
    
    _vehicle = vehicle player;
    waituntil {uiSleep 0.5;(driver _vehicle == player)};
    
    while {(driver _vehicle == player)} do {
    _vehicle = vehicle player;
    _humanity = player getVariable["humanity", 0];
    _isBandit = (_humanity <= -2500);
    _isHero = (_humanity >=5000);
      
    
    _inVehicle = (_vehicle != player);  
    _BanditVeh = typeOf _vehicle in ["hilux1_civil_3_open_DZE","datsun1_civil_3_open_DZE"];
    _HeroVeh = typeOf _vehicle in ["V3S_Open_TK_CIV_EP1","V3S_Open_TK_EP1","KamazOpen_DZE"]; 
      
    
    
    
    if (_inVehicle && _HeroVeh && _isBandit && (driver _vehicle == player)) then {
    systemchat "<Prevention>:vehicle not allowed for your humanity amount!";
      player action['getOut', _vehicle];
     }else{
      
    
    if (_inVehicle && _BanditVeh && _isHero && (driver _vehicle == player)) then {
    systemchat "<Prevention>:vehicle not allowed for your humanity amount!";
      player action['getOut', _vehicle];
     }else{ 
    
    
    if ((driver _vehicle == player)&& _inVehicle && !_isBandit && !_isHero  &&  _BanditVeh or _HeroVeh ) then {
    systemchat "<Prevention>:vehicle not allowed for your humanity amount!";
      player action['getOut', _vehicle];
    };
    };
    }; 
    waituntil {uiSleep 0.5;(driver _vehicle == player)};
    };

     

     

    now in init.sqf

    paste:

    [] execVM 'humveh\hum_veh.sqf';

    below of:

    execFSM "\z\addons\dayz_code\system\player_monitor.fsm";

     

  11. Just now, totis said:

    Im interested in this too.

    can someone write an example?

    Quick idea where start to build.

    _humanity = player getVariable["humanity", 0];
    _isBandit = (_humanity <= -2500);
    _isHero = (_humanity >=5000);
      
    _vehicle = vehicle player;
    _inVehicle = (_vehicle != player);  
    _BanditVeh = typeOf _vehicle in ["hilux1_civil_3_open_DZE","datsun1_civil_3_open_DZE"];
    _HeroVeh = typeOf _vehicle in ["V3S_Open_TK_CIV_EP1","V3S_Open_TK_EP1","KamazOpen_DZE"]; 
      
    
    
    
    if (_inVehicle && _HeroVeh && _isBandit (driver _vehicle == player)) exitWith {
    systemchat "<Prevention>:vehicle not allowed for your humanity amount!";
      player action['getOut', _vehicle];
     };
      
    
    if (_inVehicle && _BanditVeh && _isHero (driver _vehicle == player)) exitWith {
    systemchat "<Prevention>:vehicle not allowed for your humanity amount!";
      player action['getOut', _vehicle];
     };  

     

  12. hey @Runewulv  nice spot..  i dont have the game installed any more.. so cannot test..  can you try this fix?

    in your fn_selfactions.sqf

    add the line commented:

    Spoiler
    
    
    if (_typeOfCursorTarget in DZE_isWreck) then {			
    _waslooted = _cursorTarget getVariable["waslooted",false];
    if (!_waslooted) then {
    _player_deleteBuild = false;//ADD THIS LINE
    if (s_player_wreckloot < 0) then {
    s_player_wreckloot = player addAction [format["<t color='#0096ff'>Find Items</t>"], "scripts\wreck\wreck.sqf",_cursorTarget,0, false,true];};
          
        } else {
            player removeAction s_player_wreckloot;
            s_player_wreckloot = -1;
        
    	};
    	};

     

     

     

  13. Just now, totis said:

    Like this between private and _tooclose  ( i used 10 ppl ) :

    private ["_unitGroup","_tooClose","_wpSelect"];
    _unitGroup = _this select 0;

    waitUntil {
        uiSleep 5;
        count playableUnits > 10;
    };

    _tooClose = true;
    while {_tooClose} do {

    Do you think there is any code for announcing the spawn of the jet to players?

    [nil,nil,rTitleText,"Jet spawn", "PLAIN",10] call RE;

    but put it out of the loop.

  14. Just now, Hooty said:

    2 questions.  Could I use the no leave with the most wanted script and can i add more then one call to the pause.

    Example   onPauseScript = "sandstorm\noleave.sqf","BLAH\BLAH.sqf";           

    yes or include this block at bottom of your blah.sqf

    if (sandstormvar) exitWith {
                    _esc closedisplay 0;
                     systemchat ("<ANTIHACK>:Cannot Abort in a sandstorm");
                    }; 
                       //your variable about ESC key cannot be called _esc  take a look on it.

     

    for example this is my whole noleave.sqf ( i use just one file to put all restrictions)

    Spoiler
    
    	[] spawn {
    		private["_playerpos","_DMzone","_DMrange","_inDM","_inVehicle","_vehicle","_colorTXT","_btnTitle0TXT","_btnTitle1TXT","_btnTitle2TXT","_startTime","_display","_btnSave","_btnRestart","_btnRespawn","_btnTitle0","_btnTitle1","_btnTitle2"];
    			_colorTXT =  [0.8,0.2,0,1];
    			_btnTitle0TXT = "NUCLEAR WARS";
    			_btnTitle1TXT = "SURVIVAL MOD";
    			_btnTitle2TXT = "";
    			disableSerialization;
    			_startTime = time;
    			while{1 == 1}do
    			{
    				waitUntil {uiSleep 0.1;!isNull findDisplay 49};
    				_display = findDisplay 49;
    				if(!isNull _display)then
    				{
    					_btnSave = _display displayCtrl 103;
    					_btnSave ctrlShow true;
    					_btnSave ctrlEnable false;
    					_btnSave ctrlSetScale 0.8;
    					_btnSave ctrlSetText 'PlayerUID (SteamID):';
    					_btnSave ctrlCommit 0;
    					
    					_btnRestart = _display displayCtrl 119;
    					_btnRestart ctrlShow true;
    					_btnRestart ctrlEnable false;
    					_btnRestart ctrlSetScale 0.9;
    					_btnRestart ctrlSetText (format['%1',getPlayerUID player]);
    					_btnRestart ctrlCommit 0;
    					
    					_btnRespawn = _display displayCtrl 1010;
    					_btnRespawn ctrlShow true;
    					_btnRespawn ctrlSetScale 0.9;
    					if((canStand player) || (deathHandled))then
    					{
    						_btnRespawn ctrlEnable false;
    						_btnRespawn ctrlSetText 'byJuandayz';
    					}
    					else
    					{
    						_waitTime = 180;
    						_btnRespawn ctrlEnable false;
    						_btnRespawn ctrlSetText format['wait %1s',round((_startTime + _waitTime) - time)];
    						if(time > _startTime + _waitTime)then
    						{
    							_btnRespawn ctrlEnable true;
    							_btnRespawn ctrlSetText 'Respawn';
    							_startTime = time;
    						};
    					};
    					_btnRespawn buttonSetAction '[player,''btnRespawn''] spawn player_death;player setHit[''Body'',1];
    					';
    					_btnRespawn ctrlCommit 0;
    					
    					_btnTitle0 = _display displayCtrl 523;
    					_btnTitle0 ctrlSetText _btnTitle0TXT;
    					_btnTitle0 ctrlSetTextColor _colorTXT;
    					_btnTitle0 ctrlSetScale 0.9;
    					_btnTitle0 ctrlCommit 0;
    					
    					_btnTitle1 = _display displayCtrl 121;
    					_btnTitle1 ctrlSetText _btnTitle1TXT;
    					_btnTitle1 ctrlSetTextColor _colorTXT;
    					_btnTitle1 ctrlSetScale 0.9;
    					_btnTitle1 ctrlCommit 0;
    					
    					_btnTitle2 = _display displayCtrl 120;
    					_btnTitle2 ctrlSetText _btnTitle2TXT;
    					_btnTitle2 ctrlSetTextColor _colorTXT;
    					_btnTitle2 ctrlSetScale 0.9;
    					_btnTitle2 ctrlCommit 0;
    					
    					_vehicle = vehicle player;
                        _inVehicle = (_vehicle != player);
                        if (_inVehicle) exitWith {
                        systemchat "<ANTIHACK>: You cannot log out in vehicles!";
                        _display closedisplay 0;
                        };
    					_playerpos = getpos player;
    					_DMzone = [3412.77,3929.4153,0];    
                        _DMrange = 150;
                        _inDM = false;
                        
                      
    				  
    				  if (acidrainvar) exitWith {
                    _display closedisplay 0;
                     systemchat ("<ANTIHACK>:Cannot Abort in a acidrain");
                    };
                      
    				  
    				  
                     if (sandstormvar) exitWith {
                    _display closedisplay 0;
                     systemchat ("<ANTIHACK>:Cannot Abort in a sandstorm");
                    };
    				
    				 if (rfogvar) exitWith {
                    _display closedisplay 0;
                     systemchat ("<ANTIHACK>:Cannot Abort in a radioactivefog");
                    };
                      
    				if (inBunker) exitWith {
                    _display closedisplay 0;
                     systemchat ("<ANTIHACK>:Cannot Abort into a bunker");
                    };  
    			
    				};
    			};
    		};

     

     

  15. Just now, DAmNRelentless said:

    I was checking his settings with TeamViewer, everything was correct and I've redone all the database related steps for him. Still doesn't want to connect. I guess it's more a thing of the Dayz_Server. It's an already edited server so either i am completly dumb (although I set up hundres of servers xD) or the dayz_server is broken.

    mmm maybe.. but when the dayz_server.pbo is broken drop errors on rpt about cannot load server_monitor and those files..

    heres a quick video that i made just right now.. maybe can help a lil.

     

  16. @killerkiwi  hey mate. i always use xamp for it.  this is the way i do it:

    1-Run xamp with Mysql and apache.

    2-open mysql adm panel.

    3-create a database.

    4-create an user acount with 127.0.0.1 as host. ( not localhost with text) all privileges actives.

    5-Onces i did it.. close xamp and run  heidy sql to asociate the database with the user and load epoch default tables.

    6-open my HiveExt.ini   and this is important for me, cuz other way dsnt work..

    this line:

    Host = 127.0.0.1

    must be as above.. not writed  with @localhost 

×
×
  • Create New...