Support for ZonesSolved

My players love this plugin - but when we have PVP events I need to modify the code or turn off LifeSupport for the whole server which affects everyone and not just those participating in events.

It would be great if LifeSupport had options in the config to NOT prevent death if players are in specific zones.  Like an array in the config that we could place the zone ID's.  I've had to edit the code to make this happen and it would be much easier if we could just pop them in a config.  Thank you!

That's a great suggestion. I'll see what I can come up with. 

Merged post

I just updated Life Support. It now has a hook that is called before it saves a life. The receiving plugin can check the player against players participating in an event or located in a zone and suppress Life Support by returning any non-null value. 

Let me know if this helps.

 

I think this helps for new plugins that I create, but would not satisfy the existing plugins (Like Zone Manager).  I was referring more to config array within this plugin where I could input several Zone Manager ID's (e.g. 399288119) into the config. The code will then check against the list of ZM ID's in the config. I could work it out when i get a chance, but I just dont have the time right now.

Here is some pseudo code that comes to mind:

private object OnPlayerDeath(BasePlayer player, HitInfo hitInfo)   //would need wounded as well
{
array zmids = getList_Of_ZoneManagerIDs_from_config();
for( i=0;zmids.count;i++)    
 {
    if (ZoneManager.Call<bool>("IsPlayerInZone", zmids[i].ToString(), player)
           return null;
 }
}

config:
"ZoneManagerEventIDs": [ "82291913", "82991003" ],

you get the idea :)      thank you very much

Support added for Dangerous Treasures and Zone Manager

Eq6x7USivVvOJr7.jpg OG61

Support added for Dangerous Treasures and Zone Manager

You're awesome!  This is such great news.  Thank you!!!!
Locked automatically