Jump to content

Defent

Member
  • Posts

    720
  • Joined

  • Last visited

Posts posted by Defent

  1. That's like the worst chat log I've ever seen. How can you possibly think that we would believe it's legit? It's not hard to copy and paste something from a teamspeak chat.. or even print screen it.

    Instead you post something like this which could be heavily doctored.

     

    Moron.

     

    2/10 - Good try though.

  2. It allows server admins to run .sqf files without the need to restart the server, seeing how admins can do what they want anyways, I don't really see this big security hole :unsure: what am i missing here ?

    What if you have one bad admin that decides to fuck you over. Is it logged, can you see what's executed and when? If not he can pretty much fuck up the server and not even be the first person to suspected. Since the code is launched the way it is I also guess it bypasses most security settings. 

     

    I would say that this would be a security flaw. Given if the circumstances I mentioned are as they are.

     

    Edit: I'm referring to the default epoch anti hack and not infistar. 

    You can edit who has the power to run that script in the infistar anti hack. I am fairly sure you can't in the default one.

  3. RandomPrimary = {
    	private ["_wpArray","_slct","_amArray"];
    	
    	_wpArray = [
    	"AKM_Epoch",
    	"MultiGun"
    	];
    	
    	// select from the array
    	_slct = _wpArray select floor(random(count _wpArray));
    	
    	_amArray = getArray (configFile >> "cfgWeapons" >> _slct >> "magazines");
    	
    	
    	// add Weapon and ammo
    	player addWeapon _slct;
    	
    	for "_i" from 0 to 4 do 
    	{
    		player addMagazine (_amArray select 0);
    	};
    };
    

    This works, I tested it in arma 3, just change the array of weapons to the arma 2 weapons.

     

    Then do 

    _things = call RandomPrimary;
    
  4. Defent, how would I add the weapon to the inventory?

    DefaultWeapons = ["ItemMap",_wpArray];
    

    Doesn't seem to work. What should go in place of "_wpArray".

    RandomPrimary = {
    	private ["_wpArray","_slct"];
    	
    	_wpArray = [
    	"M16A2",
    	"M16A4",
    	"M4A1",
    	"Sa58P_EP1",
    	"Sa58V_EP1",
    	"AKS_74_U",
    	"AK_47_M",
    	"AK_74",
    	"FN_FAL",
    	"Winchester1866",
    	"MR43",
    	"M1014",
    	"Remington870_lamp",
    	"LeeEnfield",
    	"Saiga12K",
    	"huntingrifle"
    	];
    	
    	_slct = _wpArray select floor(random(count _wpArray));
    	
    	[_slct] call AddAmmo;
    };
    
    addAmmo = {
    private ["_addthings","_amArray"];
    	_addThings = _this select 0;
    	_amArray = getArray (configFile >> "cfgWeapons" >> _addThings >> "magazines");
    	for "_i" from 0 to 4 do 
    	{
    		player addMagazine (_amArray select 0);
    	};
    }; 

    This randoms a weapon for you. After that you could do

    _stuff = call RandomPrimary;
    DefaultWeapons = ["ItemMap",_stuff];
    
    
    

    This should circumvent the need for default magazines, ive not tested it though.

     

    Sorry for the edits, keep trying to fix it :)

  5. RandomPrimary = {
    	private ["_wArray","_select","_amArray"];
    
    	_wArray = [
    	["M16A2","30Rnd_556x45_Stanag"],
    	["M16A4","30Rnd_556x45_Stanag"],
    	["M4A1","30Rnd_556x45_Stanag"],
    	["Sa58P_EP1","30Rnd_762x39_SA58"], // listed twice?
    	["Sa58V_EP1","30Rnd_762x39_SA58"],
    	["AKS_74_U","30Rnd_545x39_AK"],
    	["AK_47_M","30Rnd_762x39_AK47"],
    	["AK_74","30Rnd_545x39_AK"],
    	["FN_FAL","20Rnd_762x51_FNFAL"],
    	["Winchester1866","15Rnd_W1866_Slug"],
    	["MR43","2Rnd_shotgun_74Slug"],
    	["M1014","8Rnd_B_Beneli_74Slug"],
    	["Remington870_lamp","8Rnd_B_Beneli_74Slug"],
    	["LeeEnfield","10x_303"],
    	["Saiga12K","8Rnd_B_Saiga12_74Slug"],
    	["huntingrifle","5x_22_LR_17_HMR"]
    	]:
    	
    	_select = _wArray select floor(random(count _wArray));
    	
    	from "_i" from 0 to 4 do {
    		
    		player addMagazine (_select select 1);
    		
    	};
    	
    	player addWeapon (_select select 0);
    };
    
    

    You could also do this but then you'd not use the defaultweapon and magazine command

  6. Donnovan, you can easily speed up your script by not using arbitrary calculations to calculate something like for exmple 

    _rMin = 10^8;
    

    The answer will always be 100000000 in this case. Also there is a command to check the power of (x), to make it more neat. 

    https://community.bistudio.com/wiki/exp

     

    You've also wound up the calculations a lot. I don't see why you'd complicate it this much. 

    _error = abs (_dist - _goal);
    

    Why are you checking the absolute value here? It only checks how far your sum is from 0. Negative 6 is 6 away from zero, but so is also positive 6. This becomes very unreliable when using distances etc imo since it's often relied on a set pos. -5040 is very different from +5040. I know that distance is always positive but it may mess up a bit.

     

    I'm not trying to be a dick here but this could cause some performance issues, is all im trying to say.

     

    https://community.bistudio.com/wiki/Math_Commands

  7. Get rid of scripts that are poorly written. Run maintenence SQL schedules. Remove empty, unlocked, damaged or non-key vehicles. And get rid of scripts that are just not useful. Say if you have like some super fancy intro script with fireworks and stuff. That will surley affect your server FPS.

  8. Also we don't know the circumstances of these "logs" nor do we know if they are real. Chances are seeing all the stories of the corrupt stuff from MGT I would be happy to believe the story.

     

    *puts tinfoil hat on*

     

    Well that pretty much makes the entire discussion and topic moot then. He can't prove what hes' saying is true nor can MGT. People still takes sides because shit storming is fun.

     

    In the end, who gives a shit. God damn..

     

    S1fSk.gif

  9. Do you not remember the bugs associated with MySQL in A2 Epoch?

    I remember getting on servers and needing to wait 2-3 minutes for a trader window to open, or for it to timeout and leave me unable to purchase that category until I relogged.

    And I remember hopping in a vehicle before the server was able to process the sell request and getting sent to a forever black hell where I couldn't be teleported out of.

    Then there were also the times where I bought a vehicle and the server didn't have enough time to save it to the database so it just blew up when I got in it. (because of no charID yet)

     

    I much rather have a new exotic database than to have to use MySQL again.

    That was not a problem with MySQL though. That was a problem in the connection between mysql and the gameserver. MySQL works perfectly fine. Patch 1.0.4.2 had no problems with this but after the update to 1.0.5.2 etc the problems started happening with slow database loading.

     

     

    redis rock, you can easily create webstats and website integration. stop whining and the take the opportunity to learn something new  

     

     

    This is possible in mysql too..

  10. You can add an object to an array but there is already an array that has the object, why would you need to have a second one?

     

    Sure you can use nearestobjects, i just changed it becuase you were checking a radius of 1200 which is quite large and is not very efficent. I'd run the script server side then instead of client side as well. 

     

     

    What exacly does not work, your diag_log line or do you get an .rpt error?
    Cause there is definitly nothing wrong with this

    _safes = nearestObjects [player,["VaultStorageLocked"],12000];
    _safearray = [];
    {
    	if ((_x getVariable ["CharacterID","0"]) == "0") then {
    		diag_log str(_x); // Dont know what you want to log..
    		_safearray set [count _safearray,_x];
    	};
    } forEach _safes; 

     

    Are you really sure this works because I'm fairly sure that _x doesnt return objects. 

     

     

    You're launching the code I posted server side? Also Yes it works. 0000 or 0 depending on what it's set to in your database. 

     

     

    You need to count the safes as I said otherwise it wont work. Try it like this:

    _safes = (allMissionObjects "VaultStorageLocked");
    _count = (count _safes);
    _safearray = []; 
    
    for "_i" from 0 to _count do {
    	
    	_selectVault = _safes select _i;
    	
    	_vault = _selectVault getVariable "CharacterID";
    	
    	if (_vault = "0000" ) then {
    		_safearray set[count _safearray, _selectVault]; 	
    	};
    };
    
    
  11. private ["_safes","_safearray","_vault"]; // remeber to scope it
    _safes = (allMissionObjects "VaultStorageLocked"); // checks all objects named VaultStorageLocked thats loaded in to the current mission
    _safearray = [];  // wut
    
    _vault = _safes getVariable "CharacterID"; // gets the variable of the objects
    
    if (_vault = "0000" ) then { // checks the variable
            _safearray set[count _safearray, _safes ];  // sets the index of _safes to _safearray for whatever reason
    	//diag_log format ["SAFE TEST: SafeArray contains %1",_safeArray]; // not tested..
    };
    
    

    Will grab all safes on the map, check their characterID and if its 0000 or 0 (doesnt really matter if it says 0000 or 0) then start the next part.

     

    Edit: You might want to add a counter to check all of the vaults. Otherwise script wont really work. I suggest you check out for loops.

     

     

    but this will not work

    _safearray set[count _safearray, _x]; 

    Youre counting the array and stuff, ye that works but why do you even want to append _x to the array? 

     

    Also _x doesnt work on objects.

  12. I have tested that map in the editor. It looks nice and all but it runs very low when it comes to FPS. I got about 25-30 fps on that map. Got higher when I set viewdistance to about 500 inside a city. Maybe 30-40 there.

     

    If you add a mod on top of this it will tank the FPS even further and then add a bunch of players. It will have huge performance issues sadly.

     

    But it looks good. 

  13. Are you sure you have turned events on? 

    Click the main database tab and execute these commands to see:

    SET GLOBAL event_scheduler = ON;
    SET @@global.event_scheduler = ON;
    SET GLOBAL event_scheduler = 1;
    SET @@global.event_scheduler = 1;
    
×
×
  • Create New...