Jump to content

Donnovan

Member
  • Posts

    840
  • Joined

  • Last visited

  • Days Won

    12

Posts posted by Donnovan

  1. GEBRIEL SAFEZONES UPDATED

    - 30 seconds of bonus god mode and no-shot for players leaving the trader.

    - 15 seconds of bonus god mode and no-shot for vehicles leaving the trader.

    - Don't need any change in infiStar if you use it (i announced that a change would be needed).

    - Ownerity stays even if you log-off or die.

    Need any help in installation? Ask me here!

  2. This one, bellow, does not use the custom statistics, it uses the build-in tables object_data and character_data:

    http://177.54.147.235/objects_arround.asp?X=5789&Y=8648&Rad=45

    Altough, its a quite nice tool for admins.

    It show Construction Objects, Vehicles, Destroyed Vehicles and Alive Players arround one point of the map.

    It show Alive Players even if they arent on the server, the next update will show only online players, and for that i will need to go custom.

    I have in my server a custom player action that show X and Y position.

    Example of use 1:

    Player: Admin, i can't put my plot pole.

    Admin: Give me your position.

    Player: 5789 and 8648.

    Admin: One sec please.

    Admin: There is already a plot pole near you. Can't you see it?

    ...

    Example of use 2:

    Player: I lost connection and now i can't see the vehicle i was in!

    Admin: Tell me your position please.

    Player: I'm sit down.

    Admin: No...

    Player: Ah, sorry! It's 5634 and 12033.

    Admin: What vehicle?

    Player: Its a BRDM.

    [10 seconds]

    Admin: There is a BRDM 250 meters from your position.

    Player: What direction?

    Admin: Sorry, use your spider sense.

    Player: LOL...

    [3 seconds]

    Player: Really, what direction?

    Player: Admin?

    Example of use 3:

    Player: Can you tell if there is someone alive in Stary. I want to camp with my sniper there.

    Admin: No.

    Player: :( no one in Stary?

    Admin: No, can't tell you that.

    Player: It's the F2 key, then you turn icons on.

    Player: Admin?

    Admin: We have Gebriel Safe Zones.

    Player: OH NOOOOOOOES!!!!

    ...

  3. Hi itsatrap,

    I made a small insertion of code in the server file server_playerDied.sqf.

    This is my custom server_playerDied.sqf, the custom code starts in //DONN MYSQL BEGIN and ends in //DONN MYSQL END:

    private ["_characterID","_minutes","_newObject","_playerID","_infected","_victim","_victimName","_killer","_killerName","_weapon","_distance","_message","_loc_message","_key","_death_record"];
    //[unit, weapon, muzzle, mode, ammo, magazine, projectile]
    _characterID = 	_this select 0;
    _minutes =		_this select 1;
    _newObject = 	_this select 2;
    _playerID = 	_this select 3;
    _infected =		_this select 4;
    if (((count _this) >= 6) && {(typeName (_this select 5)) == "STRING"} && {(_this select 5) != ""}) then {
    	_victimName =	_this select 5;
    } else {
    	_victimName =  if (alive _newObject) then {name _newObject;} else {"";};
    };
    _victim = _newObject;
    _newObject setVariable ["bodyName", _victimName, true];
    
    _killer = _victim getVariable["AttackedBy", "nil"];
    _killerName = _victim getVariable["AttackedByName", "nil"];
    
    // when a zombie kills a player _killer, _killerName && _weapon will be "nil"
    // we can use this to determine a zombie kill && send a customized message for that. right now no killmsg means it was a zombie.
    if ((typeName _killer) != "STRING") then
    {
    	_weapon = _victim getVariable["AttackedByWeapon", "nil"];
    	_distance = _victim getVariable["AttackedFromDistance", "nil"];
    
    	if ((owner _victim) == (owner _killer)) then 
    	{
    		_message = format["%1 killed himself",_victimName];
    		_loc_message = format["PKILL: %1 killed himself", _victimName];
    	}
    	else
    	{
    		_message = format["%1 was killed by %2 with weapon %3 from %4m",_victimName, _killerName, _weapon, _distance];
    		_loc_message = format["PKILL: %1 was killed by %2 with weapon %3 from %4m", _victimName, _killerName, _weapon, _distance];
    
    		//DONN MYSQL BEGIN
    		_a2n_sql_run = format [
    			"Arma2NETMySQLCommand ['dayz_epoch_stats', 'INSERT INTO KILLS VALUES ('%1',NULL,'%8','%2','%3','%9','%4','%5','%6',%7)']",
    			don_date_time,
    			_victimName,
    			_playerID,
    			_killerName,
    			getPlayerUID _killer,
    			_weapon,
    			_distance,
    			"PLAYER",
    			"PLAYER"
    		];
    		diag_log format["STATS A2N KILL: %1", _a2n_sql_run];
    		"Arma2Net.Unmanaged" callExtension _a2n_sql_run;
    		//DONN MYSQL END
    	};
    
    	diag_log _loc_message;
    
    	if(DZE_DeathMsgGlobal) then {
    		[nil, nil, rspawn, [_killer, _message], { (_this select 0) globalChat (_this select 1) }] call RE;
    	};
    	/* needs customRemoteMessage
    	if(DZE_DeathMsgGlobal) then {
    		customRemoteMessage = ['globalChat', _message, _killer];
    		publicVariable "customRemoteMessage";
    	};
    	*/
    	if(DZE_DeathMsgSide) then {
    		[nil, nil, rspawn, [_killer, _message], { (_this select 0) sideChat (_this select 1) }] call RE;
    	};
    	if(DZE_DeathMsgTitleText) then {
    		[nil,nil,"per",rTITLETEXT,_message,"PLAIN DOWN"] call RE;
    	};
    
    	// build array to store death messages to allow viewing at message board in trader citys.
    	_death_record = [
    		_victimName,
    		_killerName,
    		_weapon,
    		_distance,
    		ServerCurrentTime
    	];
    	PlayerDeaths set [count PlayerDeaths,_death_record];
    
    	// Cleanup
    	_victim setVariable["AttackedBy", "nil", true];
    	_victim setVariable["AttackedByName", "nil", true];
    	_victim setVariable["AttackedByWeapon", "nil", true];
    	_victim setVariable["AttackedFromDistance", "nil", true];
    };
    
    // Might not be the best way...
    /*
    if (isnil "dayz_disco") then {
    	dayz_disco = [];
    };
    */
    
    // dayz_disco = dayz_disco - [_playerID];
    _newObject setVariable["processedDeath",diag_tickTime];
    
    if (typeName _minutes == "STRING") then
    {
    	_minutes = parseNumber _minutes;
    };
    
    diag_log ("PDEATH: Player Died " + _playerID);
    
    if (_characterID != "0") then
    {
    	_key = format["CHILD:202:%1:%2:%3:",_characterID,_minutes,_infected];
    	#ifdef DZE_SERVER_DEBUG_HIVE
    	diag_log ("HIVE: WRITE: "+ str(_key));
    	#endif
    	_key call server_hiveWrite;
    }
    else
    {
    	deleteVehicle _newObject;
    };
    Here just the custom part:

    //DONN MYSQL BEGIN
    _a2n_sql_run = format [
    	"Arma2NETMySQLCommand ['dayz_epoch_stats', 'INSERT INTO KILLS VALUES ('%1',NULL,'%8','%2','%3','%9','%4','%5','%6',%7)']",
    	don_date_time,
    	_victimName,
    	_playerID,
    	_killerName,
    	getPlayerUID _killer,
    	_weapon,
    	_distance,
    	"PLAYER",
    	"PLAYER"
    ];
    diag_log format["STATS A2N KILL: %1", _a2n_sql_run];
    "Arma2Net.Unmanaged" callExtension _a2n_sql_run;
    //DONN MYSQL END
    
    Hope the code is not too big those show here that way.
  4. This SQL change the old id with the new id and the new id with the old id, so you have your old character back.

    set @oldID = '82888333';
    set @newID = '76561197993172434';
    
    update character_data set PlayerUID = concat(@oldID,'_CHANGE') where PlayerUID = @oldID and Alive = 1;
    update character_data set PlayerUID = @oldID where PlayerUID = @newID and Alive = 1;
    update character_data set PlayerUID = @newID where PlayerUID = concat(@oldID,'_CHANGE') and Alive = 1;
    82888333 is the old id

    76561197993172434 is the new id

    Note the 'Alive=1' condition. If the player was in dead state before the version change, there is nothing to do.

    If you want to do it in only one server instance, you need to add the Instance=11 (11, or wathever instance you want to change) condition on the 3 update lines.

    To find old id and new id you can use this SQL:

    select * from player_data where PlayerName like '%Jones%';
    Where Jones is the hint for the nick.

    To avoid character steal, you can ask for key itens that was on the old character. To see the itens on the old character, you can use this SQL:

    set @oldID = '82888333';
    select Inventory, Backpack from character_data where PlayerUID = @oldID and Alive = 1;
    82888333 is the old id.

    You also can ask for the old player id as a way to avoid steal, but in my few experiences on this most players don't had it.

  5. You can try that for a simplier version.

     

    set @oldID = '82888333';
    set @newID = '76561197993172434';
    
    update character_data set PlayerUID = concat(@oldID,'_CHANGE') where PlayerUID = @oldID and Alive = 1;
    update character_data set PlayerUID = @oldID where PlayerUID = @newID and Alive = 1;
    update character_data set PlayerUID = @newID where PlayerUID = concat(@oldID,'_CHANGE') and Alive = 1;
    This SQL was updated on the other post!
  6. This SQL change the old id with the new id and the new id with the old id, so you have your old character back.

    set @oldID = '82888333';
    set @newID = '76561197993172434';
    
    update character_data set PlayerUID = concat(@oldID,'_CHANGE') where PlayerUID = @oldID and Alive = 1;
    update character_data set PlayerUID = @oldID where PlayerUID = @newID and Alive = 1;
    update character_data set PlayerUID = @newID where PlayerUID = concat(@oldID,'_CHANGE') and Alive = 1;
    76561197993172434 is the new id

    82888333 is the old id

    Note the 'Alive=1' condition. If the player was in dead state before the version change, there is nothing to do.

    If you want to do it in only one server instance, you need to add the Instance=11 (11, or wathever instance you want to change) condition on the 3 update lines.

    To find old id and new id you can use this SQL:

    select * from player_data where PlayerName like '%Jones%';
    Where Jones is the hint for the nick.

    To avoid character steal, you can ask for key itens that was on the old character. To see the itens on the old character, you can use this SQL:

    set @oldID = '82888333';
    select Inventory, Backpack from character_data where PlayerUID = @oldID and Alive = 1;
    82888333 is the old id.
  7. I tend to agree, DayZ Commander became something more important than the game itself.

    This is because it's try to make things easy because it check versions and everything, you don't need to set the expansions manually.

    At the end you have a big player base that have not learned how to set files, versions, manually.

    Not sure if it worth.

  8. You can add your server to DayZ Commander, manually, using the steamqueryport. For example, if your server is at ip/port 100.123.4.57:2302 and your steamqueryport is 2301, add on DayZ Commander the server 100.123.4.57:2301 (yes, 2301).

    I can give my players with DayZ Commander this new ip/port, with steamqueryport, to be added manually. Not awesome news, but its nice.

  9. I followed this guide after the commander update aswell, but my server shows on steam but not commander

     

    Edit: Working now had to add the server to commander using the it's steam query port

    You can add your server to DayZ Commander, manually, using the steamqueryport. For example, if your server is at ip/port 100.123.4.57:2302 and your steamqueryport is 2301, add on DayZ Commander the server 100.123.4.57:2301 (yes, 2301).

    steamqueryport is set on server config.cfg, as the main post guide told us to do.

    goatservers, why not a new post for this important info? You made a edit and most persons missed it. And, for sure, thankyou!

    Also, Steam needs to classificate your servers first, so let it on and, i believe, Steam will classificate it as Epoch after some time and put the 1.0.5.1 version on it.

    If you try to join the server without this classification, it will think it is a Arma 2 OA server, and not a Arma 2 OA Epoch server.

  10. NEW FEATURE 1 - *NOT STILL ON MAIN POST*

    - Players have a aditional god mode (30 sec) when leaving the safe zones.

    - Vehicles have a aditional god mode (15 sec) when leaving the safe zones.

    - Players and vehicles can't shot when in the aditional god mode state.

    EXTRA REQUERIMENT FOR NEW FEATURE 1 TO WORK

    - If you does not use infiStar, the extra requeriment does not exist.

    - If you use infiStar, like we do on our server, the extra requeriment is: modify 1 line of infiStar AH.SQF file.

    Are you guys interested in see it?

    UPDATE ON FIX 1 - SEE POST ABOVE

    Remember FIX 1 on the post above this one? This fix will not work if you have infiStar, so players on safes still can die if a vehicle runs over hin and, may be, players still can die for AI.

    To that FIX 1 to works on servers with infiStar and players stop diening with those causes (vehicle & AI) it's needed a change in 1 line of infiStar AH.SQF file.

    Are you guys interested in see it?

    CONCLUSION

    So the 30 seconds aditional god mode and a 100% eficienty god mode solution requires the change of 2 lines in infiStar AH.SQF file.

    If you don't use infiStar, there will be no extra needs to use those new feature and fix, remembering the new feature is still not revealed on main post.

  11. Sorry to ask, if i can't test now.

    infiStar safe zones allow players to shot inside the safe?

    I'm working in a 30 seconds god mode for players when they goes out of the safe, to avoid then get killed by safe campers. During this 30 seconds the player must not be allowed to shot. This is happening just for infiStar admins, they can't shot, all other players can shot, like people said above.

    I take a look at infiStar safe zones code, above, and i believe it allow players to shot in safe. Can anyone please confirm? Sorry, can't test now.

    Thankyou very mucha!

  12. NEWS: FIX 1, PLAYER GOD MODE - !DONE!

    *Main post updated* with fix 1. Fix 1 consists of 4 lines that was added on "[MISSION FOLDER]\CUSTOM\SAFEZONE.SQF". Those linas are commented with a "//FIX 1" at the end.

     

    What its fix?

    The ausence of those lines (2 when turning god mode on and 2 when turning it off) alowed player to die when a vehicle runs over hin, and, not fully confirmed, allowed player to die when shot by a soldier AI.

    The added lines are already on main post, they are:

    player removeAllEventHandlers "handleDamage"; //FIX 1
    player addEventHandler ["handleDamage", {0}]; //FIX 1
    player removeAllEventHandlers "handleDamage"; //FIX 1
    player addEventHandler ["handleDamage", {_this select 2}]; //FIX 1
    NEWS: FIX 2, VEHICLE OWNERITY ON LOGOFF - !WIP!

    If the player have ownerity over a vehicle inside the safe, and he logoff from the game and join again, he will loose this vehicle ownerity but the message that inform owners, when someone try to invade the vehicle, will still show him as a owner.

    Way to fix: Store owners as player UID strings instead of player Objects. Fix is a work in progress still.

×
×
  • Create New...