Jump to content

BigEgg

Member
  • Posts

    362
  • Joined

  • Last visited

  • Days Won

    28

Posts posted by BigEgg

  1. On 11/21/2016 at 2:28 PM, looter809 said:

    Hey guys. I'm not very good at coding. Is there a way to automatically add the owner to the plot pole? To somehow have "call PlotAddFriend;" after placing the plot pole or something? I can't find where the code is that says "you have placed a 30m plot pole" but i figured i could copy that file to my mpmissioncache and add "add PlotAddFriend;" to it or something. Maybe this is a weird way to do it. Any suggestions to auto add the owner?

    My other Idea was to use the PlayerBuild.sqf that is already in Snap_Pro folder and maybe do 

    
    // check if friendly to owner
    	if(dayz_characterID == _ownerID) then {  //Keep ownership
    		// owner can build anything within his plot except other plots
    		if(!_isPole) then {
    			_canBuildOnPlot = true;
    			call PlotAddFriend;
    		};

    Would that work maybe?

     
     

    I haven't tested this, just threw it together. Basically, just PlotAddFriend modified to add the builder to the plot.

     

    Add this to the private array at the top of player_build.sqf (I used the default player_build.sqf from snap pro files)

    ,"_nearPlots", "_selectedPlot", "_onPlot", "_uidPlayer", "_playerName"

    Then, find this line (the position of this may need to change - please test): 

    cutText [format[(localize "str_epoch_player_139"),_text, _counter,_limit], "PLAIN DOWN"];

    And add this under it:

    if (_classname == "Plastic_Pole_EP1_DZ") then {
    	_nearPlots = nearestObjects [player, ["Plastic_Pole_EP1_DZ"],15];
    	_selectedPlot = _nearPlots select 0;
    	_onPlot = _selectedPlot getVariable ["plotfriends",[]];
    	_uidPlayer = getPlayerUID player;
    	_playerName = name player;
    	_onPlot = _onPlot  + [[_uidPlayer,_playerName]];
    	_selectedPlot setVariable ["plotfriends", _onPlot, true];
    	PVDZE_veh_Update = [_selectedPlot,"gear"];
    	publicVariableServer "PVDZE_veh_Update";
    	if (isServer) then {
    		PVDZE_veh_Update call server_updateObject;
    	};
    };

    Let me know if it works. Like I said though, I use plot 4 life so haven't tested this. If it does add you to the plot after you build it, restart and see if you stay on it. :)

  2. On 6/5/2016 at 2:16 AM, don2k7 said:

    hi yea i have the SC_fnc_removeCoins & SC_fnc_addCoins in the advanced trader\functions folder and yea in the advanced trading config I have the variable im using advanced trading 2.1 and zsc 3.0

     

    I don't believe those files in the functions folder are compiled in the default download.

     

    Add this to the top of your compiles.sqf:

     

    SC_fnc_removeCoins=
    {
        private ["_player","_amount","_wealth","_newwealth", "_result"];
        _player = _this select 0;
        _amount = _this select 1;
        _result = false;
        _wealth = _player getVariable["cashMoney",0];  
        if(_amount > 0)then{
        if (_wealth < _amount) then {
            _result = false;
        } else {                         
        _newwealth = _wealth - _amount;
        _player setVariable["cashMoney",_newwealth, true];
        _player setVariable ["moneychanged",1,true];    
        _result = true;
        PVDZE_plr_Save = [_player,(magazines _player),true,true] ;
        publicVariableServer "PVDZE_plr_Save";            
        };
        }else{
        _result = true;
        };
        _result
    };
    	
    SC_fnc_addCoins = 
    {
    	private ["_player","_amount","_wealth","_newwealth", "_result"];			
    	_player =  _this select  0;
    	_amount =  _this select  1;
    	_result = false;	
    	_wealth = _player getVariable["cashMoney",0];
    	_player setVariable["cashMoney",_wealth + _amount, true];
    	PVDZE_plr_Save = [_player,(magazines _player),true,true] ;
    	publicVariableServer "PVDZE_plr_Save";
    	_player setVariable ["moneychanged",1,true];					
    	_newwealth = _player getVariable["cashMoney",0];		
    	if (_newwealth >= _wealth) then { _result = true; };			
    	_result
    };

     

    Let me know how that works.

     

    +1 to @Joshyy  for finding the possible solution.

  3. 4 hours ago, [RDG]GavinM said:

    THX, I'll give it a try when I get home. I also have another question. Planing on adding a donator trader, how do I set access to a certain humanity or player uid?

    This would be against Epoch monetization policy. Probably wouldn't be the best idea to ask that on here ;)

  4. Just now, _Lance_ said:

    Aha! See I thought about that and now I wish I'd have tested it - I installed my sc 3.0 first and the config file came preconfig'd with that setting so I left it as COINS - so when I inistalled advanced trading 2.1 I set config for that as coins as well - BUT - Would that cause me to be able to sell, but not BUY using adv trading 2.1? configs attached advtrading2.1 on left, sc3.0 on right.

    woops.jpg

    Yes - cashMoney is the variable added to the character that defines how much money it has.

     

    CurrencyName is just the name of your currency and is entirely different than the variable that advanced trading is looking for.

  5. 2 minutes ago, _Lance_ said:

    Yes, I have it set to true. Thanks for the response I do appreciate it.

    The only time you would see this message:

    systemChat format["You need %1 %2 to buy all these items.",_priceToBuy,CurrencyName];

    would be when you do not have the correct amount of money it is looking for.

     

    Also make sure that you have this set to "cashMoney":

    Z_MoneyVariable = "cashMoney";

     

  6. 51 minutes ago, _Lance_ said:

    I think I've got a good one here - I haven't seen it mentioned anywhere else YET - but then again I've only been searching for a fix since last night. Sorry for the massive incoming story but it's all for reason:

    Three weeks ago I up and decided I wanted my own overpoch server. Like 3 years too late. I asked a guy I met while playing dayz who runs his own server,  where his was hosted and he told me about GTXgaming. So yeah, I went and got a gtx all-in-one, overpoch, followed a couple mod tutorials to add some basic mods (WAI etc) and was happy for a week or so, until I started looking at what makes everything work, and I realized GTX basically stole zupa/raymix/noxsicarius/everyone's mods and organized them within two folders sets to use a mod loader inside the mission/options folder that they keep hidden from clients view, but I digress....

    Anyways I was like "Be damned if I'm going to pay for something they stole, so I "borrowed" it from them and patched in the hidden files from the single currency 4.0 mod files, jerry-rigged up an identical fresh DB and boom I had my exact GTX server running on my own hardware at work, on a fresh database, for free. My neckbearded friends rejoiced in the $20 a month we'd save. - But It still isn't what I wanted, I wanted to make my own exactly like i want it, GTX's server build seems to be modded into a corner, they don't use advanced trading 2.1 and I think it's because it's somehow conflicting with something eIse but I haven't been doing this long enough to be able to tell yet -

    So in the meantime I started modding my own server and after two builds I kept running into currency issues - much more advanced in skill after my 2nd week at this - lol - I set out to make my perfect server, I decided I was going to get the mods I'd had trouble with, out of the way right from the start. SC3.0, Advanced trading 2.1 (ooo pretty) plot mgmt, door mgmt, group mgmt -> then on to the "easy stuff" - Well I'm stuck at advanced trading 2.1 - for some reason I can't BUY with advanced trading, the trader doesn't see my coins. What really sucks is that there's nothing in the RPT/server/hive logs as to why. Normal trading works fine both ways. And I can SELL using the "gorgeous" advanced trading menu, but when I try to sell something I get "YOU NEED X COINS TO BUY ALL THESE ITEMS" -

    Obviously I've tried googling by that message and amazingly didn't see the exact same issue - I Have worked about half-way through this thread now and so far haven't seen the same issue here either - I'm posting in case someone's seen that exact issue and can point me in a direction, without error logs showing anything I'm not sure what I did wrong here.  Again - using normal trader menu, can buy and sell - using adv trader menu - I can sell but can't buy because trader can't see my coins;

    My server: I started with a standard epoch->overpoch build using this guy's (Gaero?) guides -> https://www.youtube.com/watch?v=Kopq4qvfKH4 except I opted to not rename my mission folders when I dropped in the overwatch stuff, other than that, same server and it works great - oh one possible difference from the norm - he has you install custom loot entries folder within the mission folder - not sure if thats the way everyone does that, but I'm new to this so unfortunately he was the first guide I found.

    My zupa/advancedtrading/config.sqf or similar named file is correctly configured, true=traders can take $ from backpack or vehicle, single currency switch is flipped and currency type is set to "Coins" - Only other mods installed are SC 3.0 using PBO, infistar 8/25 build, and zupa's walking zeds, which by the way gtx runs that mod from the same folder same way but they changed the "zupa" to "gtx" - Anyways,  Any advice would be greatly appreciated.

     

    Have you made sure all the settings in the config file are correct? 

     

    Make sure, since you are using Single Currency 3.0, that you have this set to true:

    Z_SingleCurrency = true;

     

  7. Okay I see.

     

    Try this:

     

    wirecutmenu = {showcommandingMenu "#USER:wirecut";};
    [] spawn wirecutmenu;

     

    So it would look like this:

     

    if (_rand <= 65 && _rand > 31) then {
                bomb = 0;
    wirecut =
    [
        ["",true],
        ["wirecut", [-1], "", -5, [["expression", ""]], "1", "0"],
        ["", [-1], "", -5, [["expression", ""]], "1", "0"],
        ["Red Wire", [], "", -5, [["expression", "bomb=1;"]], "1", "1"],
        ["Black Wire", [], "", -5, [["expression", "bomb=0;"]], "1", "1"],
        ["Brown Wire", [], "", -5, [["expression", "bomb=0;"]], "1", "1"],    
        ["", [-1], "", -5, [["expression", ""]], "1", "0"]
    ];
    wirecutmenu = {showcommandingMenu "#USER:wirecut";};
    [] spawn wirecutmenu;
    WaitUntil{commandingMenu == ""};    
    };

     

  8. 26 minutes ago, Bricktop said:

    Old post I know - I just reinstalled DZAI and can't figure out how to add the coin ...

    Tried and failed x3 - Could someone sort me out here?

    What code and where would I put it to add random (1000-20000) coin to DZAI patrols.

    Thanks for any help!

     

    https://gist.github.com/anonymous/4e1e92199d9f777f0bdb4fc66f654aaa

    Under:

    if ((getNumber (configFile >> "CfgMagazines" >> _magazine >> "count")) < 8) then {_unit addMagazine _magazine};

    Try pasting this:

    _aicash = round(random 100) * 197;
    _unit setVariable["cashMoney",_aicash ,true];

     

  9. Try this:

     

    Spoiler
    
    respawn = "BASE";
    respawndelay = 5;
    onLoadMission= "DayZ Epoch Chernarus";
    OnLoadIntro = "Welcome to DayZ Epoch Chernarus";
    OnLoadIntroTime = False;
    OnLoadMissionTime = False;
    disabledAI = true;
    disableChannels[]={0,2,6};
    enableItemsDropping = 0;
    #include "loot\CfgBuildingLoot.hpp"
    
    briefing = 0;
    debriefing = 0;
    
    onPauseScript = "";
    loadScreen = "\z\addons\dayz_code\gui\dayz_logo_ca.paa";
    
    class Header
    {
     gameType = COOP;            //DM, Team, Coop, ...
     minPlayers = 1;             //min # of players the mission supports
     maxPlayers = 50;            //Max # of players the mission supports
    };
    
    aiKills = 1;
    diagRadio = 1;
    diagHit = 1;
    
    class RscText
    {
        type = 0;
        idc = -1;
        x = 0;
        y = 0;
        h = 0.037;
        w = 0.3;
        style = 0x100; 
        font = Zeppelin32;
        SizeEx = 0.03921;
        colorText[] = {1,1,1,1};
        colorBackground[] = {0, 0, 0, 0};
        linespacing = 1;
    };
    class RscPicture
    {
        access=0;
        type=0;
        idc=-1;
        style=48;
        colorBackground[]={0,0,0,0};
        colorText[]={1,1,1,1};
        font="TahomaB";
        sizeEx=0;
        lineSpacing=0;
        text="";
    };
    class RscLoadingText : RscText
    {
        style = 2;
        x = 0.323532;
        y = 0.666672;
        w = 0.352944;
        h = 0.039216;
        sizeEx = 0.03921;
        colorText[] = {0.543,0.5742,0.4102,1.0};
    };
    class RscProgress
    {
        x = 0.344;
        y = 0.619;
        w = 0.313726;
        h = 0.0261438;
        texture = "\ca\ui\data\loadscreen_progressbar_ca.paa";
        colorFrame[] = {0,0,0,0};
        colorBar[] = {1,1,1,1};
    };
    class RscProgressNotFreeze
    {
        idc = -1;
        type = 45;
        style = 0;
        x = 0.022059;
        y = 0.911772;
        w = 0.029412;
        h = 0.039216;
        texture = "#(argb,8,8,3)color(0,0,0,0)";
    };
    //
    // the loading screen itself
    //
    class DayZ_loadingScreen
    { 
        idd = -1;
        duration = 10e10;
        fadein = 0;
        fadeout = 0;
        name = "loading screen";
        class controlsBackground
        {
            class blackBG : RscText
            {
                x = safezoneX;
                y = safezoneY;
                w = safezoneW;
                h = safezoneH;
                text = "";
                colorText[] = {0,0,0,0};
                colorBackground[] = {0,0,0,1};
            };
            /*
            class nicePic : RscPicture
            {
                style = 48 + 0x800; // ST_PICTURE + ST_KEEP_ASPECT_RATIO
                x = safezoneX + safezoneW/2 - 0.25;
                y = safezoneY + safezoneH/2 - 0.2;
                w = 0.5;
                h = 0.4;
                text = "img\nicePic.paa";
            };
            */
        };
        class controls
        {
            class Title1 : RscLoadingText
            {
                text = "$STR_LOADING"; // "Loading" text in the middle of the screen
            };
            class CA_Progress : RscProgress // progress bar, has to have idc 104
            {
                idc = 104;
                type = 8; // CT_PROGRESS
                style = 0; // ST_SINGLE
                texture = "\ca\ui\data\loadscreen_progressbar_ca.paa";
            };
            class CA_Progress2 : RscProgressNotFreeze // progress bar that will go reverse
            {
                idc = 103;
            };
            class Name2: RscText // the text on the top-left
            {
                idc = 101;
                x = 0.05;
                y = 0.029412;
                w = 0.9;
                h = 0.04902;
                text = "";
                sizeEx = 0.05;
                colorText[] = {0.543,0.5742,0.4102,1.0};
            };
        };
    };
    
    class RscTitles {
        //Single Currency
        class ZSC_Money_Display {
            idd = -1;
            fadeout=0;
            fadein=0;
            duration = 20;
            name= "ZSC_Money_Display";
            onLoad = "uiNamespace setVariable ['ZSC_Money_Display', _this select 0]";
            class controlsBackground {
                class ZSC_Status
                {
                    idc = 4900;
                    type = 13;
                    size = 0.040;
                    x = safezoneX + (safezoneW -0.35);
                    y = safezoneY + 0.40 * safezoneW;
                    w = 0.35; h = 0.20;
                    colorText[] = {1,1,1,1};
                    lineSpacing = 3;
                    colorBackground[] = {0,0,0,0};
                    text = "";
                    style = 0x02;
                    shadow = 2;
                    font = "Zeppelin32";
                    sizeEx = 0.023;
                    class Attributes {
                        align = "right";
                    };
                };
            };
        };
    	#include "dzgm\icons.hpp"
    };
    #include "custom\singlecurrency\traders\cfgServerTrader.hpp"
    #include "custom\singlecurrency\config\defines.hpp"
    #include "custom\singlecurrency\config\ZSCdefines.hpp"
    #include "custom\singlecurrency\config\ZSCdialogs.hpp"
    #include "custom\singlecurrency\config\ATMdefines.hpp"
    #include "custom\singlecurrency\config\ATMdialogs.hpp"
    #include "custom\singlecurrency\transfer\transferdefines.hpp"
    #include "custom\singlecurrency\transfer\transferdialog.hpp"
    #include "zupa\advancedTrading\advancedTrading.hpp"
    #include "custom\snap_pro\snappoints.hpp"
    #include "plotManagement\plotManagement.hpp"
    #include "custom\extra_rc.hpp"
    #include "dzgm\defines.hpp"
    #include "dzgm\groupManagement.hpp"

     

     

×
×
  • Create New...