I wanted my first plugin to be something I took a liking to from Chaos Theory
You can now customize Tesla Gates. (currently only enable/disable and role immunities, but more to come!)
1 messages · Page 1 of 1 (latest)
I wanted my first plugin to be something I took a liking to from Chaos Theory
You can now customize Tesla Gates. (currently only enable/disable and role immunities, but more to come!)
Instead of separate booleans for the config you could make a RoleTypeId List and check if a players role is contained withen it
How would I go about doing that?
if (Plugin.Main.Config.RoleList.Contains(ev.Player.Role))
ev.IsAllowed = false
Alright, thanks!
It works! Tysm!
Btw, how do I make a list that can be changed by an RA command, but resets every time the round restarts?
Make a static list, modify it with the command, check it with the event, reset it with OnWaitingForPlayers (or whatever it’s called)
alr ty
Added tgimmunity command
https://github.com/DylanJ3191/ConfigurableTeslaGates/releases/tag/v1.2.0
is_enabled can now be found in the main config file
Added option to clear the list of immune players upon round restart
Had to remove is_enabled from main config due to issues
how do I turn off tesla completely
I don't know how to stop them from powering up, but if you set GatesEnabled in the config to false, they will not fire.
there's a way to stop them from powering up, I did it once, lemme check my code
Bro I did it all
.
I've been using OnPlayerTriggeringTesla cuz it's all I could find in the API
uhhh I used Exiled but you could just patch out the method RpcDoIdle or something and accomplish the same thing
teslas are old I guess so they all use RPCs
it doesn't look like LabAPI has a OnIdlingTesla event so you're gonna have to patch stuff depending on what you want
I've just been preventing it from firing when it wants to
I jst been using LabApi, cuz NullPointerException when querying for EXILED knowledge
so LabAPI has a OnIdledTesla method
if you use that
determine it shouldnt idle
then just call RpcDoneIdling on the tesla gate
pls don't try it rn unless u want to, it's in pre-release for a reason...
Thanks for the tip, it's now an official part of v2.0.0!
Wait I can finally mess with Teslagates AGAIN? PMER needs to re-implement this
yeah
also
v2.0.0 Official Release!!!!
https://github.com/DylanJ3191/ConfigurableTeslaGates/releases/tag/v2.0.0
This was made as a stand-alone plugin, so I do not know how it will function when used with other plugins. Please let me know if you find any bugs!
I'll start working on an update later
April fools update: Released. (v2.1.0 - v2.1.1)
Changelog:
Plugin will now do the opposite as intended, except for commands. (+ config option to disable)