Jump to content

joe_candy

Member
  • Posts

    30
  • Joined

  • Last visited

Posts posted by joe_candy

  1. at the top of the "getvehicle.sqf" is _vehicle difined.

    _vehicle = lbData[2802,(lbCurSel 2802)];
    _vehicle = (call compile format["%1",_vehicle]);
    _vehicleClass = getText(configFile >> "CfgVehicles" >> (_vehicle select 1) >> "vehicleClass");
    

    i do not get it.
    On my first attempt, the query code works with the helipad, but the query with the carpad not work. Although I have used the same variable. As if the "carpad" is ignored and thereby generates an error.

     

    *Edit*

    Now everything works fine....

    changed _vehicle to _vehicleclass and modify the player position.

     

    //Get Spawn Location
    _dir = round(random 360);
    _vgposplayer = getPos player;
    _helipad = nearestObjects [_vgposplayer, ["HeliH","HeliHCivil","HeliHRescue","MAP_Heli_H_army"], 70];
    _vgcarspawn = nearestObjects [_vgposplayer, ["MAP_Heli_H_cross","Sr_border"], 70];
    if((count _helipad == 0) && (_vehicleclass isKindOf "Air")) exitWith {cutText ["You need a helipad to spawn air vehicles", "PLAIN DOWN"];};
    if((count _vgcarspawn == 0) && (_vehicleclass isKindOf "Land")) exitWith {cutText ["You need a carpad to spawn land vehicles", "PLAIN DOWN"];};
    
    if((count _helipad > 0) && (_vehicleclass isKindOf "Air")) then {
    	_location = (getPosATL (_helipad select 0));
    } else {
    	if((count _vgcarspawn > 0)&& (_vehicleclass isKindOf "Land")) then {
    		_location = (getPosATL (_vgcarspawn select 0));
    	} else {
    		_location = [(position player),0,20,1,0,2000,0] call BIS_fnc_findSafePos;
    	};
    };
    

     

    thanks for your help

  2. hmm... now i tryed this code

    //Get Spawn Location
    _dir = round(random 360);
    _helipad = nearestObjects [player, ["HeliH","HeliHCivil","HeliHRescue","MAP_Heli_H_army"], 70];
    _vgcarspawn = nearestObjects [player, ["MAP_Heli_H_cross","Sr_border"], 70];
    if((count _helipad == 0) && (_vehicle isKindOf "Air")) exitWith {cutText ["You need a helipad to spawn air vehicles", "PLAIN DOWN"];};
    if((count _vgcarspawn == 0) && (_vehicle isKindOf "Land")) exitWith {cutText ["You need a carpad to spawn land vehicles", "PLAIN DOWN"];};
    
    if((count _helipad > 0) && (_vehicle isKindOf "Air")) then {
    	_location = (getPosATL (_helipad select 0));
    } else {
    	if((count _vgcarspawn > 0)&& (_vehicle isKindOf "Land")) then {
    		_location = (getPosATL (_vgcarspawn select 0));
    	} else {
    		_location = [(position player),0,20,1,0,2000,0] call BIS_fnc_findSafePos;
    	};
    };
    

    but same problem.

     

    if i called a car from garage, it doesn't spawn anything.... RPT log is clear... :( next time i try with "_vehicleclass isKindOf"...

     

    some more ideas?

  3. Hey, i can't find my error, so i hope you could help me...

     

    I try to use two different spawnpoints for Air and Land vehicle with two different "helipads".

     

    "HeliHCivil" -> air vehicle

    "Sr_border" -> land vehicle

     

    i try some different codes at the "getvehicle.sqf" but nothing works.

    RPT don't log some errors, so i don't know where i could find my error.

     

    Try this code

    //Get Spawn Location
    _dir = round(random 360);
    _helipad = nearestObjects [player, ["HeliH","HeliHCivil","HeliHRescue","MAP_Heli_H_army"], 70];
    _vgcarspawn = nearestObjects [player, ["MAP_Heli_H_cross","Sr_border"], 70];
    if((count _helipad == 0) && (_vehicleClass == "Air")) exitWith {cutText ["You need a helipad to spawn air vehicles", "PLAIN DOWN"];};
    if((count _vgcarspawn == 0) && (_vehicleClass == "Land")) exitWith {cutText ["You need a carpad to spawn land vehicles", "PLAIN DOWN"];};
    if((count _helipad > 0) && (_vehicleClass == "Air")) then {
    	_location = (getPosATL (_helipad select 0));
    	} else {
    		if((count _vgcarspawn > 0) && (_vehicleClass == "Land")) then {
    		_location = (getPosATL (_vgcarspawn select 0));
    	} else {
    		_location = [(position player),0,20,1,0,2000,0] call BIS_fnc_findSafePos;
    	};};
    

     

    original getvehicle.sqf

    // Developed by [GZA] David for German Zombie Apocalypse Servers (https://zombieapo.eu/)
    private["_vehicle","_vehicleClass","_dir","_helipad","_location","_veh","_location","_veh","_result","_id","_inventory","_backpack","_fuel","_damage","_id"];
    if(lbCurSel 2802 == -1) exitWith {hint  "No Vehicle selected"};
    closeDialog 0;
    _vehicle = lbData[2802,(lbCurSel 2802)];
    _vehicle = (call compile format["%1",_vehicle]);
    _vehicleClass = getText(configFile >> "CfgVehicles" >> (_vehicle select 1) >> "vehicleClass");
    
    
    
    //Get Spawn Location
    _dir = round(random 360);
    _helipad = nearestObjects [player, ["HeliH","HeliHCivil","HeliHRescue","MAP_Heli_H_army","MAP_Heli_H_cross","Sr_border"], 70];
    if((count _helipad == 0) && (_vehicleClass == "Air")) exitWith {cutText ["You need a helipad to spawn air vehicles", "PLAIN DOWN"];};
    if(count _helipad > 0) then {
    _location = (getPosATL (_helipad select 0));
    } else {
    _location = [(position player),0,20,1,0,2000,0] call BIS_fnc_findSafePos;
    };
    
    _veh = createVehicle ["Sign_arrow_down_large_EP1", _location, [], 0, "CAN_COLLIDE"];
    
    
    PVDZE_spawnVehicle = [_veh, [_dir,_location], player,  (_vehicle select 0)]; // _vehicle select 0 = id
    publicVariableServer "PVDZE_spawnVehicle";
    
    waitUntil {!isNil "PVDZE_spawnVehicleResult"};
    
    if(PVDZE_spawnVehicleResult != "0") then {
    			_result = "0";
    			_id = parsenumber PVDZE_spawnVehicleResult;
    			if ((_id > 0) && (_id <= 2500)) then {_result = format["ItemKeyGreen%1",_id];};
    			if ((_id > 2500) && (_id <= 5000)) then {_result = format["ItemKeyRed%1",_id-2500];};
    			if ((_id > 5000) && (_id <= 7500)) then {_result = format["ItemKeyBlue%1",_id-5000];};
    			if ((_id > 7500) && (_id <= 10000)) then {_result = format["ItemKeyYellow%1",_id-7500];};
    			if ((_id > 10000) && (_id <= 12500)) then {_result = format["ItemKeyBlack%1",_id-10000];};
    			
    			_inventory = (weapons player);
    			_backpack = ((getWeaponCargo unitBackpack player) select 0);
    			if (_result in (_inventory+_backpack)) then
    			{
    				if (_result in _inventory) then {cutText [format["Key [%1] already in your inventory!",_result], "PLAIN"];};
    				if (_result in _backpack) then {cutText [format["Key [%1] already in your backpack!",_result], "PLAIN"];};
    			}
    			else
    			{
    				player addweapon _result;
    				cutText [format["Key [%1] added to your inventory!",_result], "PLAIN"];
    				
    			};
    };
    
    PVDZE_spawnVehicleResult = nil;
    PVDZE_queryGarageVehicleResult = nil;
    sleep 2;
    cutText ["Spawned Vehicle.", "PLAIN DOWN"];
    

  4. sorry for my question, but is the extDB2 not only for ARMA3 or can I use them for ARMA 2?
    everytime i try to install the extDB i get an error "this mod is invalid (@extDB)"

    where could i get an extDB for ARMA 2 which works with the Virtual Garage Script?

    everything i found with google was the extDB for ARMA 3

  5. What about Zupa's Single Currency 3.0 (default hive, no global bank)? Is either version stored in the same location in database, or will I need to change something to make it work with 3.0?

     

    to use this with ZSC use this:

     

    add to currency_dialog.hpp at the top of the file

    //------------- Zupa's Single Currency 3.0 -------------//
    
    class Life_RscText {
    	x = 0;
    	y = 0;
    	h = 0.037;
    	w = 0.3;
    	type = 0;
    	style = 0;
    	shadow = 1;
    	colorShadow[] = {0, 0, 0, 0.5};
    	font = "Zeppelin32";
    	SizeEx = "(			(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
    	text = "";
    	colorText[] = {1, 1, 1, 1.0};
    	colorBackground[] = {0, 0, 0, 0};
    	linespacing = 1;
    	tooltipColorText[] = {1,1,1,1};
    	tooltipColorBox[] = {1,1,1,1};
    	tooltipColorShade[] = {0,0,0,0.65};
    };
    class RscTextT
    {
    	access = 0;
    	type = 0;
    	idc = -1;
    	colorBackground[] = {0,0,0,0};
    	colorText[] = {0.8784,0.8471,0.651,1};
    	text = "";
    	fixedWidth = 0;
    	x = 0;
    	y = 0;
    	h = 0.037;
    	w = 0.3;
    	style = 0;
    	shadow = 2;
    	font = "Zeppelin32";
    	SizeEx = 0.03921;
    };
    
    class Life_RscEdit {
    	type = 2;
    	style = 0x00 + 0x40;
    	font = "Zeppelin32";
    	shadow = 2;
    	sizeEx = "(			(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
    	colorBackground[] = {0, 0, 0, 1};
    
    	colorText[] = {0.95, 0.95, 0.95, 1};
    	colorDisabled[] = {1, 1, 1, 0.25};
    	autocomplete = false;
    	colorSelection[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 1};
    	canModify = 1;
    	soundPush[] = { "", 0, 1 };
    	soundEnter[] =	{ "", 0, 1 };
    	soundClick[] ={ "", 0, 1 };
    	soundEscape[] ={ "", 0, 1 };
    	sound[] ={ "", 0, 1 };
    };
    		
    class Life_RscTitle : Life_RscText {
    	style = 0;
    	sizeEx = "(			(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
    	colorText[] = {0.95, 0.95, 0.95, 1};
    };
    
    class Life_RscShortcutButton {
    	idc = -1;
    	style = 0;
    	default = 0;
    	shadow = 1;
    	w = 0.183825;
    	h = "(		(		((safezoneW / safezoneH) min 1.2) / 1.2) / 20)";
    	color[] = {1,1,1,1.0};
    	colorFocused[] = {1,1,1,1.0};
    	color2[] = {0.95,0.95,0.95,1};
    	colorDisabled[] = {1,1,1,0.25};
    	colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1};
    	colorBackgroundFocused[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1};
    	colorBackground2[] = {1,1,1,1};
    	animTextureDefault = "gui\normal_ca.paa";
    	animTextureNormal = "gui\normal_ca.paa";
    	animTextureDisabled = "gui\normal_ca.paa";
    	animTextureOver = "gui\over_ca.paa";
    	animTextureFocused = "gui\focus_ca.paa";
    	animTexturePressed = "gui\down_ca.paa";
    	periodFocus = 1.2;
    	periodOver = 0.8;
    	class HitZone
    	{
    		left = 0.0;
    		top = 0.0;
    		right = 0.0;
    		bottom = 0.0;
    	};
    	class ShortcutPos
    	{
    		left = 0;
    		top = "(			(		(		((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - 		(			(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2";
    		w = "(			(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)";
    		h = "(			(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
    	};
    	class TextPos
    	{
    		left = "(			(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)";
    		top = "(			(		(		((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - 		(			(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2";
    		right = 0.005;
    		bottom = 0.0;
    	};
    	period = 0.4;
    	font = "Zeppelin32";
    	size = "(			(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
    	sizeEx = "(			(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
    	text = "";
    	action = "";
    	class Attributes
    	{
    		font = "Zeppelin32";
    		color = "#E5E5E5";
    		align = "left";
    		shadow = "true";
    	};
    	class AttributesImage
    	{
    		font = "Zeppelin32";
    		color = "#E5E5E5";
    		align = "left";
    	};
    	
    	soundPush[] = { "", 0, 1 };
    	soundEnter[] =	{ "", 0, 1 };
    	soundClick[] ={ "", 0, 1 };
    	soundEscape[] ={ "", 0, 1 };
    	sound[] ={ "", 0, 1 };
    };
    
    class Life_RscButtonMenu : Life_RscShortcutButton {
    	idc = -1;
    	type = 16;
    	style = "0x02 + 0xC0";
    	default = 0;
    	shadow = 0;
    	x = 0;
    	y = 0;
    	w = 0.095589;
    	h = 0.039216;
    	animTextureNormal = "#(argb,8,8,3)color(1,1,1,1)";
    	animTextureDisabled = "#(argb,8,8,3)color(1,1,1,1)";
    	animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
    	animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";
    	animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
    	animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
    	colorBackground[] = {0,0,0,0.8};
    	colorBackgroundFocused[] = {1,1,1,1};
    	colorBackground2[] = {0.75,0.75,0.75,1};
    	color[] = {1,1,1,1};
    	colorFocused[] = {0,0,0,1};
    	color2[] = {0,0,0,1};
    	colorText[] = {1,1,1,1};
    	colorDisabled[] = {1,1,1,0.25};
    	period = 1.2;
    	periodFocus = 1.2;
    	periodOver = 1.2;
    	size = "(			(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
    	sizeEx = "(			(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
    	tooltipColorText[] = {1,1,1,1};
    	tooltipColorBox[] = {1,1,1,1};
    	tooltipColorShade[] = {0,0,0,0.65};
    	class TextPos
    	{
    		left = "0.25 * 			(			((safezoneW / safezoneH) min 1.2) / 40)";
    		top = "(			(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - 		(			(			(			((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2";
    		right = 0.005;
    		bottom = 0.0;
    	};
    	class Attributes
    	{
    		font = "Zeppelin32";
    		color = "#E5E5E5";
    		align = "left";
    		shadow = "false";
    	};
    	class ShortcutPos
    	{
    		left = "(6.25 * 			(			((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005";
    		top = 0.005;
    		w = 0.0225;
    		h = 0.03;
    	};
    	textureNoShortcut = "";
    };
    
    //------------- Zupa's Single Currency 3.0 -------------//
    

     

    same file disable the bank buttons with /* */ like this

    /*        class CurrencyAddBankButton : life_RscButtonMenu 
    		{
    			idc = -1;
    			text = "Add bank";
    			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
    			onButtonClick = "[(ctrlText 15003),currencyTarget,'add','bank'] spawn CurrencyTransferMoney; ((ctrlParent (_this select 0)) closeDisplay 9000);";
    			colorText[] = {0.8784,0.8471,0.651,1};
    			x = 0.4;
    			y = 0.495;
    			w = (6 / 30);
    			h = (1 / 25);
    		}; */
    
    /*		class CurrencyRemoveBankButton : life_RscButtonMenu 
    		{
    			idc = -1;
    			text = "Remove bank";
    			colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
    			onButtonClick = "[(ctrlText 15003),currencyTarget,'remove','bank'] spawn CurrencyTransferMoney; ((ctrlParent (_this select 0)) closeDisplay 9000);";
    			colorText[] = {0.8784,0.8471,0.651,1};
    			x = 0.4;
    			y = 0.585;
    			w = (6 / 30);
    			h = (1 / 25);
    		}; */
    

     

    then it should work

  6. ^^ think he means "get" ^^

    same problem at my server.

    if i trade with any trader, i don't get coins for selling something and don't loose coins if i buy something.

    first i think it was my mistake, cause i renamed the coins. but now i change the correct name but the problem don't be fixed.

     

    any idea?

     

    i use ZSC 3.0

     

    *Edit*

     

    ok, i fixed the Problem ^^

     

    ...ZSC\compiles\SC_fnc_addCoins.sqf change this

    /*
    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
    */

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

     

    to this:

    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


    /*
    private ["_player","_amount","_wealth","_newwealth", "_result"];            
    _player =  _this select  0;
    _amount =  _this select  1;
    _result = false;    
    _wealth = _player getVariable["headShots",0];
    _player setVariable["headShots",_wealth + _amount, true];
    PVDZE_plr_Save = [_player,(magazines _player),true,true] ;
    publicVariableServer "PVDZE_plr_Save";
    _player setVariable ["moneychanged",1,true];                    
    _newwealth = _player getVariable["headShots",0];        
    if (_newwealth >= _wealth) then { _result = true; };            
    _result
    */

     

    and at SC_fnc_removeCoins.sqf change this

     

    /*
    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

    */

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

     

    to this:

    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

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

  7. Hey there...

     

    I would like to use the group managemant system, but to invite a player should costs coins.

    some idea how to realize that?

     

    i've a idea like this

     

    add at the inviteToGroup.sqf

     

     

    Own Code deletet, cause was wrong. This code is the right one. Thx and credits to Gr8

    if (player != leader group player) exitWith {systemChat "You are not the leader and can not invite people.";};
    
    disableSerialization;
    
    private ["_dialog","_playerListBox","_pTarget","_index","_playerData","_check","_hasInvite"];
    
    _dialog = findDisplay 55510;
    _playerListBox = _dialog displayCtrl 55511;
    _index = lbCurSel _playerListBox;
    _playerData = _playerListBox lbData _index;
    _hasInvite = false;
    _playerCash = player getVariable ["cashMoney",0]; // Check the Money
    _price = 1000;
    _check = 0;
    {
        if ((!isNull _x) && {isPlayer _x} && {str(_x) == _playerData}) exitWith {_pTarget = _x;_check = 1;};
    } count playableUnits;
    
    if (_check == 0) exitWith {systemChat "You must select someone to invite first.";};
    if (_pTarget == player) exitWith {systemChat "You can not invite yourself.";};
    if (count units group _pTarget > 1) exitWith {systemChat "This player is already in a group.";};
    
    {if (_x select 1 == getPlayerUID _pTarget) then {_hasInvite = true;};} forEach currentInvites;
    if (_hasInvite) exitWith {systemChat "This player already has a pending invite.";};
    if (_playerCash < _price) exitWith {systemChat "You need 1000 coins to invite a player.";}; // Check failed
    currentInvites set [count currentInvites,[getPlayerUID player,getPlayerUID _pTarget]];
    publicVariableServer "currentInvites";
    player setVariable["cashMoney",(_playerCash - _price),true];
    [nil,_pTarget,"loc", rTITLETEXT, format["You have received a group invite. Right Shift to view."], "PLAIN", 0] call RE;
    
    systemChat format["You have invited %1 to join the group",name _pTarget];
    systemChat "Press left windows key to toggle group name tags";
    

     

    can't test it with myself ^^ just have to wait for the second server admin ^^

    so i just ask here if my idea will be correct. ^^

     

    PS: Ok, first test... it doesn't work... try to find the mistake

  8. Hey... I've a question about the vehicle safe system from WAI... How could i disable that the vehicles will be safe at database and warn players when they sit in spawned vehicles, that it will be despawn at server restart? I try this code (import from DZSM) at the custom_publishVehicle.sqf

    private ["_object","_worldspace","_location","_dir","_class","_uid","_dam","_hitpoints","_selection","_array","_damage","_fuel","_key","_totaldam","_spawnDMG","_characterID];
    //[_veh,[_dir,_location],"V3S_Civ",true]
    _object = 		_this select 0;
    _worldspace = 	_this select 1;
    _class = 		_this select 2;
    _spawnDMG =		_this select 3;
    _characterID =  _this select 4;
    
    _fuel = 1;
    _damage = 0;
    _array = [];
    
    diag_log ("PUBLISH: Attempt " + str(_object));
    _dir = 		_worldspace select 0;
    _location = _worldspace select 1;
    
    //Generate UID test using time
    // _uid = str( round (dateToNumber date)) + str(round time);
    _uid = _worldspace call dayz_objectUID2;
    //_uid = format["%1%2",(round time),_uid];
    
    if (_spawnDMG) then { 
    	_fuel = 0;
    	if (getNumber(configFile >> "CfgVehicles" >> _class >> "isBicycle") != 1) then {
    
    		// Create randomly damaged parts
    	
    		_totaldam = 0;
    		_hitpoints = _object call vehicle_getHitpoints;
    		{
    			// generate damage on all parts
    			_dam = call generate_new_damage;
    
    			_selection = getText(configFile >> "cfgVehicles" >> _class >> "HitPoints" >> _x >> "name");
    			
    			if (_dam > 0) then {
    				_array set [count _array,[_selection,_dam]];
    				_totaldam = _totaldam + _dam;
    			};
    		} forEach _hitpoints;
    		
    
    		// just set low base dmg - may change later
    		_damage = 0;
    		_fuel = wai_mission_fuel;
    	};
    	
    	//If saving vehicles to the database is disabled, lets warn players it will disappear
    	if (!(WAISaveVehicles)) then {
    		_object addEventHandler ["GetIn",{
    			_nil = [nil,(_this select 2),"loc",rTITLETEXT,"Warning: This vehicle will disappear on server restart!","PLAIN DOWN",5] call RE;
    		}];
    	};
    };
    
    // TODO: check if uid already exists and if so increment by 1 and check again as soon as we find nothing continue.
    
    if (WAISaveVehicles) then {
    
    //Send request
    _key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, _damage , _characterID, _worldspace, [], _array, _fuel,_uid];
    diag_log ("HIVE: WRITE: "+ str(_key)); 
    _key call server_hiveWrite;
    
    PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
    
    // Switched to spawn so we can wait a bit for the ID
    [_object,_uid,_fuel,_damage,_array,_characterID,_class] spawn {
       private["_object","_uid","_fuel","_damage","_array","_characterID","_done","_retry","_key","_result","_outcome","_oid","_selection","_dam","_class"];
    
       _object = _this select 0;
       _uid = _this select 1;
       _fuel = _this select 2;
       _damage = _this select 3;
       _array = _this select 4;
       _characterID = _this select 5;
       _class = _this select 6;
    
       _done = false;
    	_retry = 0;
    	// TODO: Needs major overhaul
    	while {_retry < 10} do {
    		
    		sleep 1;
    		// GET DB ID
    		_key = format["CHILD:388:%1:",_uid];
    		diag_log ("HIVE: WRITE: "+ str(_key));
    		_result = _key call server_hiveReadWrite;
    		_outcome = _result select 0;
    		if (_outcome == "PASS") then {
    			_oid = _result select 1;
    			_object setVariable ["ObjectID", _oid, true];
    			diag_log("CUSTOM: Selected " + str(_oid));
    			_done = true;
    			_retry = 100;
    
    		} else {
    			diag_log("CUSTOM: trying again to get id for: " + str(_uid));
    			_done = false;
    			_retry = _retry + 1;
    		};
    	};
    	};
    
    };	
    	if(!_done) exitWith { deleteVehicle _object; diag_log("CUSTOM: failed to get id for : " + str(_uid)); };
    
    	_object setVariable ["lastUpdate",time];
    	_object setVariable ["CharacterID", _characterID, true];
    	_object setDamage _damage;
    
    	// Set Hits after ObjectID is set
    	{
    		_selection = _x select 0;
    		_dam = _x select 1;
    		if (_selection in dayZ_explosiveParts and _dam > 0.8) then {_dam = 0.8};
    		[_object,_selection,_dam] call object_setFixServer;
    	} forEach _array;
    	
    	_object setFuel _fuel;
    	
    	_object setvelocity [0,0,1];
    
    	_object call fnc_veh_ResetEH;
    
    	// testing - should make sure everyone has eventhandlers for vehicles was unused...
    	PVDZE_veh_Init = _object;
    	publicVariable "PVDZE_veh_Init";
    
    	diag_log ("PUBLISH: Created " + (_class) + " with ID " + str(_uid));
    };

    first Test works fine. The vehicles don't will be save at the database. But if i sit in, there won't be a warning about despawn. Don't know my mistake. hope someone could help...

  9. WAI already has anti-vehicle. It's called RPGs and two M2 .50BMG turrets.

     

    Most people consider anything that kills the player to be pretty extreme as far as punishment goes, especially for something that doesn't make logical sense since there is already anti-vehicle measures they would have to deal with, so I don't think very many people will be willing to help you with this. Even if your server has tanks, two RPGs to the same side will disable the tracks and prevent the tank from going anywhere, and a disabled tank to me is not worth a breifcase or two.

     

    Hey...

     

    The anti-vehicle of WAI last time doesn't work.... I've addet also MAAWS and M107 to the AI... First week it works fine.... after a time some guys begin to run over the AI and could loot the high weapons (i use custom loottable, so they can't find this weapons somewhere else).

     

    I'm also no friend of such a extreme Player kill Trigger. I'm just looking for a solution for the probem.

    First time i try a Trigger with "vehicle setdamage 1" but this also doesn't work.

     

    Today i try to import the "DZMS run over" configuration to WAI... but until now it isn't work.....

     

    *Edit*

     

    ok... find my mistake. Now the "run over" Configuration works fine and i don't need so a extreme trigger... ^^

    This Thread could be deletet.

  10. Hey.. I've a few problems with players who use bugs with vehicles to get loot from the AI. So i like to add a trigger at the WAI marker, which destroy player vehicle if they drive into the mission area.

    But there is a mistake at my idea, so the missions spawns without the trigger...

    But there is also no Error at the rpt file.

    Hope someone could help me.

     

    There is one of the Mission files with my addet trigger...

    //Armed Vehicle
    private ["_playerPresent","_cleanmission","_currenttime","_starttime","_missiontimeout","_vehname","_veh","_position","_vehclass","_vehdir","_objPosition","_Trigger1","_Trigger2","_Trigger3"];
    _vehclass = armed_vehicle call BIS_fnc_selectRandom;
    _vehname = getText (configFile >> "CfgVehicles" >> _vehclass >> "displayName");
    _position = [getMarkerPos "center",0,5500,10,0,2000,0] call BIS_fnc_findSafePos;
    antiauto1 = _Trigger1;
    antiauto2 = _Trigger2;
    antiauto3 = _Trigger3;
    diag_log format["WAI: Mission Armed Vehicle Started At %1",_position];
     _Trigger1 = createTrigger ["EmptyDetector", _position];
     _Trigger1 setTriggerArea [380, 380, 0, false];
     _Trigger1 setTriggerActivation ["ANY", "PRESENT", true];
     _Trigger1 setTriggerTimeout [0, 0, 0, true];
     _Trigger1 setTriggerStatements ["(player distance antiauto1) < 380;", "if ((vehicle player) isKindOf (""Car"")) then {titleText [""Warning, you are near a Mission. Please stop and leave your car or turn back."", ""PLAIN DOWN""];} else {""""};", ""];
     _Trigger2 = createTrigger ["EmptyDetector", _position];
     _Trigger2 setTriggerArea [330, 330, 0, false];
     _Trigger2 setTriggerActivation ["ANY", "PRESENT", true];
     _Trigger2 setTriggerTimeout [0, 0, 0, true];
     _Trigger2 setTriggerStatements ["(player distance antiauto2) < 330;", "if ((vehicle player) isKindOf (""Car"")) then {titleText [""Last Warning! You are near a Mission. Stop your car or turn back!"", ""PLAIN DOWN""];} else {""""};", ""];
     _Trigger3 = createTrigger ["EmptyDetector", _position];
     _Trigger3 setTriggerArea [280, 280, 0, false];
     _Trigger3 setTriggerActivation ["ANY", "PRESENT", true];
     _Trigger3 setTriggerTimeout [0, 0, 0, true];
     _Trigger3 setTriggerStatements ["(player distance antiauto3) < 280;", "if ((vehicle player) isKindOf (""Car"")) then {titleText [""You have been warned several times!"", ""PLAIN DOWN""]; player setdamage 1;} else {""""};", ""];
    //Chain Bullet Box
    _box = createVehicle ["USBasicWeaponsBox",[(_position select 0),(_position select 1) + 5,0], [], 0, "CAN_COLLIDE"];
    [_box] call Chain_Bullet_Box;
    //Armed Land Vehicle
    _veh = createVehicle [_vehclass,_position, [], 0, "CAN_COLLIDE"];
    _vehdir = round(random 360);
    _veh setDir _vehdir;
    _veh setVariable ["ObjectID","1",true];
    PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_veh];
    diag_log format["WAI: Mission Armed Vehicle spawned a %1",_vehname];
    _objPosition = getPosATL _veh;
    //[_veh,[_vehdir,_objPosition],_vehclass,true,"0"] call custom_publish;
    //Troops
    _rndnum = round (random 3) + 3;
    [[_position select 0, _position select 1, 0],                  //position
    _rndnum,        //Number Of units
    1,           //Skill level 0-1. Has no effect if using custom skills
    "Random",         //Primary gun set number. "Random" for random weapon set.
    4,        //Number of magazines
    "",        //Backpack "" for random or classname here.
    "Ins_Soldier_Sapper",     //Skin "" for random or classname here.
    "Random",      //Gearset number. "Random" for random gear set.
    true       // Mission true or false
    ] call spawn_group;
    [[_position select 0, _position select 1, 0],                  //position
    4,        //Number Of units
    1,           //Skill level 0-1. Has no effect if using custom skills
    "Random",         //Primary gun set number. "Random" for random weapon set.
    4,        //Number of magazines
    "",        //Backpack "" for random or classname here.
    "Ins_Soldier_Sapper",     //Skin "" for random or classname here.
    "Random",      //Gearset number. "Random" for random gear set.
    true       // Mission true or false
    ] call spawn_group;
    [[_position select 0, _position select 1, 0],                  //position
    4,        //Number Of units
    1,           //Skill level 0-1. Has no effect if using custom skills
    "Random",         //Primary gun set number. "Random" for random weapon set.
    4,        //Number of magazines
    "",        //Backpack "" for random or classname here.
    "Ins_Soldier_Sapper",        //Skin "" for random or classname here.
    "Random",      //Gearset number. "Random" for random gear set.
    true      // mission true
    ] call spawn_group;
    [[_position select 0, _position select 1, 0],                  //position
    4,        //Number Of units
    1,           //Skill level 0-1. Has no effect if using custom skills
    "Random",         //Primary gun set number. "Random" for random weapon set.
    4,        //Number of magazines
    "",        //Backpack "" for random or classname here.
    "Ins_Soldier_Sapper",        //Skin "" for random or classname here.
    "Random",      //Gearset number. "Random" for random gear set.
    true      // mission true
    ] call spawn_group;
    //Turrets
    [[[(_position select 0), (_position select 1) + 10, 0]], //position(s) (can be multiple).
    "M2StaticMG",             //Classname of turret
    1,       //Skill level 0-1. Has no effect if using custom skills
    "Ins_Soldier_Sapper",              //Skin "" for random or classname here.
    1,        //Primary gun set number. "Random" for random weapon set. (not needed if ai_static_useweapon = False)
    2,        //Number of magazines. (not needed if ai_static_useweapon = False)
    "",        //Backpack "" for random or classname here. (not needed if ai_static_useweapon = False)
    "Random",      //Gearset number. "Random" for random gear set. (not needed if ai_static_useweapon = False)
    True       // Mission true or false
    ] call spawn_static;
     
    [_position,_vehname] execVM "\z\addons\dayz_server\WAI\missions\compile\markers.sqf";
    [nil,nil,rTitleText,"Bandits have disabled an armed vehicle with lots of chain gun ammo in the gear! Check your map for the location!", "PLAIN",10] call RE;
    _missiontimeout = true;
    _cleanmission = false;
    _playerPresent = false;
    _starttime = floor(time);
    while {_missiontimeout} do {
     sleep 5;
     _currenttime = floor(time);
     {if((isPlayer _x) AND (_x distance _position <= 150)) then {_playerPresent = true};}forEach playableUnits;
     if (_currenttime - _starttime >= wai_mission_timeout) then {_cleanmission = true;};
     if ((_playerPresent) OR (_cleanmission)) then {_missiontimeout = false;};
    };
    if (_playerPresent) then {
     [_veh,[_vehdir,_objPosition],_vehclass,true,"0"] call custom_publish;
     waitUntil
     {
      sleep 5;
      _playerPresent = false;
      {if((isPlayer _x) AND (_x distance _position <= 30)) then {_playerPresent = true};}forEach playableUnits;
      (_playerPresent)
     };
     diag_log format["WAI: Mission Armed vehicle Ended At %1",_position];
     [nil,nil,rTitleText,"Survivors have secured the armed vehicle!", "PLAIN",10] call RE;
    } else {
     clean_running_mission = True;
     deleteVehicle _veh;
     deleteVehicle _box;
     deleteVehicle _Trigger1;
     deleteVehicle _Trigger2;
     deleteVehicle _Trigger3;
     {_cleanunits = _x getVariable "missionclean";
     if (!isNil "_cleanunits") then {
      switch (_cleanunits) do {
       case "ground" :  {ai_ground_units = (ai_ground_units -1);};
       case "air" :     {ai_air_units = (ai_air_units -1);};
       case "vehicle" : {ai_vehicle_units = (ai_vehicle_units -1);};
       case "static" :  {ai_emplacement_units = (ai_emplacement_units -1);};
      };
      deleteVehicle _x;
      deleteVehicle _Trigger1;
      deleteVehicle _Trigger2;
      deleteVehicle _Trigger3;
      sleep 0.05;
     }; 
     } forEach allUnits;
     
     diag_log format["WAI: Mission Armed vehicle Timed Out At %1",_position];
     [nil,nil,rTitleText,"Survivors did not secure the armed vehicle in time!", "PLAIN",10] call RE;
    };
    missionrunning = false;
    

  11. @Rythron

     

    My player_monitor.fsm is the customisated for use Spawn selection and MultiChar ^^ so it didn't work with your configuration. sry, i only upload this for users who're interested by not espacially for your problem.

     

    ----

     

    hmm... someone know how it works, if i have some more spawn Points, how to add this at random spawn?

    Using the 6 fix spawn Points will be ok, but i think about to use more spawn points at the random spawn Option.

     

    does it work, if i use for example 12 spawn Points, that i edit the Server_playerSetup.sqf at this part..

    while {_findSpot} do {
    	_counter = 0;
    	while {_counter < 20 and _findSpot} do {
    	// switched to floor
    	if (_spawnSelection == 9) then {
    		// random spawn location selected, lets get the marker and spawn in somewhere
    		if (dayz_spawnselection == 1) then { _mkr = "spawn" + str(floor(random 6)); } else { _mkr = "spawn" + str(floor(random 5)); };
    	} else {
    		// spawn is not random, lets spawn in our location that was selected
    		_mkr = "spawn" + str(_spawnSelection);
    	};
    

    with this changes?

    	// random spawn location selected, lets get the marker and spawn in somewhere
    	if (dayz_spawnselection == 1) then { _mkr = "spawn" + str(floor(random 12)); } else { _mkr = "spawn" + str(floor(random 12)); };
    

    I only think about it. Not really test it at my Server. I like to ask befor i change something ^^

  12. @DrTerrer

    You forget one config at your fsm file.

    At "Phase One" you have to change
     

    PVDZE_plr_Login2 = [_charID,player,_playerUID];

    to
     

    PVDZE_plr_Login2 = [_charID,player,_playerUID,_spawnSelection];

    thats the mistake why u spawn in wilderness.

    Also u can use my player_monitor.fsm... look there

     

    Remember, it's only works with Version 1.0.3.1!

    Hope AxeCop would be update the files soon.. ^^

  13. good to hear.. not all filetypes are allowed - make a zip-file and try it again
    .zip works ^^ So here is now the player_monitor.fsm file to use together MultiChars (by AxaCop) with Spawnselection (by jOoPs). So here is now the player_monitor.fsm file to use together MultiChars (by AxaCop) with Spawnselection (by jOoPs). Works for all Chars like.... Login -> MultiChar Menu -> Respawn -> Spawnmenu

    player_monitor.zip

  14. Yeah, it works perfekt. jOoPs, you're personally my Hero of the day! ^^ Big thx for your work and the sharing. Using with the MultiChar from AxeCops works also perfect. The FSM-Editor is pretty simple to use. I've used the editor first time and combine the two player_monitor.fsm files at a few minutes. I like to share my player_monitor.fsm, but there is everytime a error like "You aren't permitted to upload this kind of file" or "This upload failed". :(

×
×
  • Create New...