General > Developers Corner

Is it possible to disable pvp on a certain part of the map with lua?

(1/1)

Jaden Zepeda:
For instance the platform in the middle of flatgrass, disable pvp on the platform but make the ground around it pvp?

Avoid:
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

Jaden Zepeda:
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.

BobTheDuck69:
There is a simple safezone addon in workshop somewhere. if its a sandbox server theres also buildmode.

Navigation

[0] Message Index

Go to full version