ULX

Author Topic: Is it possible to disable pvp on a certain part of the map with lua?  (Read 1718 times)

0 Members and 1 Guest are viewing this topic.

Offline Jaden Zepeda

  • Newbie
  • *
  • Posts: 28
  • Karma: 0
For instance the platform in the middle of flatgrass, disable pvp on the platform but make the ground around it pvp?

Offline Avoid

  • Full Member
  • ***
  • Posts: 142
  • Karma: 42
Re: Is it possible to disable pvp on a certain part of the map with lua?
« Reply #1 on: December 20, 2014, 11:37:51 AM »
Hello there,
you could create a SENT, check if there are players "Touching" it and adjust the GM:EntityTakeDamage hook accordingly.
If you do not want to use a SENT, you could do that directly within the EntityTakeDamage hook by using FindInBox.

Thats at least two methods I can currently think of.
Avoid

Offline Jaden Zepeda

  • Newbie
  • *
  • Posts: 28
  • Karma: 0
Re: Is it possible to disable pvp on a certain part of the map with lua?
« Reply #2 on: December 29, 2014, 12:07:13 PM »
Hmmm, how would I do this? Im sorry, I am still pretty new to lua coding.
My server has a rule against killing on the platform in the middle of flatgrass and Im trying to figure out how I can disable platform killing so its no longer an issue, someone told me about using spheres or something like that.

Offline BobTheDuck69

  • Newbie
  • *
  • Posts: 33
  • Karma: 1
Re: Is it possible to disable pvp on a certain part of the map with lua?
« Reply #3 on: March 12, 2015, 11:52:06 AM »
There is a simple safezone addon in workshop somewhere. if its a sandbox server theres also buildmode.
~The friendly neighborhood duckie~