Ulysses

General => Developers Corner => Topic started by: Jaden Zepeda on December 20, 2014, 09:53:57 AM

Title: Is it possible to disable pvp on a certain part of the map with lua?
Post by: Jaden Zepeda on December 20, 2014, 09:53:57 AM
For instance the platform in the middle of flatgrass, disable pvp on the platform but make the ground around it pvp?
Title: Re: Is it possible to disable pvp on a certain part of the map with lua?
Post by: Avoid 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 (http://wiki.garrysmod.com/page/GM/EntityTakeDamage) hook accordingly.
If you do not want to use a SENT, you could do that directly within the EntityTakeDamage (http://wiki.garrysmod.com/page/GM/EntityTakeDamage) hook by using FindInBox (http://wiki.garrysmod.com/page/ents/FindInBox).

Thats at least two methods I can currently think of.
Avoid
Title: Re: Is it possible to disable pvp on a certain part of the map with lua?
Post by: Jaden Zepeda 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.
Title: Re: Is it possible to disable pvp on a certain part of the map with lua?
Post by: BobTheDuck69 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.