geekm0nkey

[solved] Moving dead player from safe zone.

9 posts in this topic

Had a few requests for this.. When a player dies inside of a safezone however it might happen.. I need to have the body and marker moved out.. Because of anti-theft the player cannot get his gear.. And even with infistar I cannot move the body, it just teleports back. 

Does anyone have or know of a script that address this? 

Edited by geekm0nkey

Share this post


Link to post
Share on other sites

why not just disabling it? 

search in fn_preInit.sqf Line 622 for "Exile_Unit_Player" and change it to "Exile_Unit_Player1" 

all other stuff is still working for me and players can loot here body in safezone :D

Share this post


Link to post
Share on other sites
Advertisement

fn_preInit.sqf you find in your infistar pbo where you also have the config file

also this was just a quick change i mad after i noticed this. i am sure this can be done better

Edited by WhiteBl00d

Share this post


Link to post
Share on other sites

OK I see the code in question, wonder if we could add a check if player is alive instead of just removing it.  So that looting of a dead player would be fine.

or

If dead player = player who is looting is OK.

 

Edited by geekm0nkey

Share this post


Link to post
Share on other sites

Took a little trial and error but this works, there may be a better way to write this.. feel free to improve upon it.. But this will only allow the owner of the dead body to collect the gear from it.. Everyone else will get the "cannot loot in safezone message"

	_name = _container getVariable ["ExileName", -1];
	_pname = name player;
	
	if(typeOf _container isEqualTo 'Exile_Unit_Player' && !(_container isEqualTo player) && (!local _container) && {ExilePlayerInSafezone} && !(_name isEqualTo _pname))exitWith
	{
		systemChat 'Can not loot a player object within a safeZone!';
		true
	};

 

Edited by geekm0nkey
  • Like 1

Share this post


Link to post
Share on other sites
On 3-6-2018 at 3:53 AM, geekm0nkey said:

Took a little trial and error but this works, there may be a better way to write this.. feel free to improve upon it.. But this will only allow the owner of the dead body to collect the gear from it.. Everyone else will get the "cannot loot in safezone message"


	_name = _container getVariable ["ExileName", -1];
	_pname = name player;
	
	if(typeOf _container isEqualTo 'Exile_Unit_Player' && !(_container isEqualTo player) && (!local _container) && {ExilePlayerInSafezone} && !(_name isEqualTo _pname))exitWith
	{
		systemChat 'Can not loot a player object within a safeZone!';
		true
	};

 

And where can i place your script m8?

Share this post


Link to post
Share on other sites
On 6/3/2018 at 3:53 AM, geekm0nkey said:

Took a little trial and error but this works, there may be a better way to write this.. feel free to improve upon it.. But this will only allow the owner of the dead body to collect the gear from it.. Everyone else will get the "cannot loot in safezone message" 


	_name = _container getVariable ["ExileName", -1];
	_pname = name player;
	
	if(typeOf _container isEqualTo 'Exile_Unit_Player' && !(_container isEqualTo player) && (!local _container) && {ExilePlayerInSafezone} && !(_name isEqualTo _pname))exitWith
	{
		systemChat 'Can not loot a player object within a safeZone!';
		true
	};

 

@geekm0nkey

Where can i place your script?

My Infistar fn_preInit.sqf only has 22 Lines.

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.