#plugins-dev-chat
1 messages · Page 203 of 1
oh i didnt even think about that
spawn a dummy hidden and can be changed who you want to resurrect
and even if you can
there is a Next something something it will sync
I actually use ragdolls instead of spectators for respawning. It's a bit too detailed to explain now, but I'll probably just patch all (2) instances of IsAnyEligibleSpectators and introduce a local method instead.
Is it possible to mod the knife to where it can’t resurrect people or give hume?
or is it still broken to where modding it is hard?
With patches sure
done that before
made a custom event that lets me change the class of the resurrected player, or just disallow it
yes you can change that value
Is it possible to only have those changes effect a specific class using the knife? Like tutorial?
say I wanted to make it to where the knife only doesn’t resurrect or give Hume shield when used by a tutorial
But works normally for the other classes
you can code when eqipped change the hs value stuff and the NextRessurectionTime or something
and when you drop/uneqpid it set back to default
why are you blue
cloudfare
sorry for the ping but will that be fixed this upcoming update or no?
most likely not
me when im trying to join my own test server but Incoming connection from endpoint rejected due to exceeding the rate limit.
QA testing it but i dont think it will be today
so maybe?
XD
(i literally cannot find out why this is happening)
wait
uh
might be us
lemme check something 😭
L
exiled strikes again
its' on twilight hosting right?
bruh
alr
the tunnel for one node got cooked last night for 0 reason
so lemme check the other node ur on
idk depends on QA, and Release Coordinators
do you have an idea of a %?
and if it does happen, plz ping me
I'm gonna put that patch in Exiled and if it gets fixed I'd rather just leave it out
0.1% 
ya I'm working on it
if cedmod is installed ensure cedmod is updated
if you're on the beta
Woah dude that’s my IP
Chill out man

127.128.47.12
127.0.0.1
Holy shit that’s my ip
Here's your real ip: 73.1.137.85
||https://zer0twois.strokinit.it/🐀/rpp8foxe.png||
||(I got it from a random ip generator so chill out if i get banned lol)||
here's my ip: 1.1.1.1
(im cloudflare)
hi google
that tracks
hi cloudflare
here is my pee, wait..
baseball huh?
baseball huh?
I wish, business ip from lumen would go crazy
is there a way to check if a joining player has been redirected from different server (by using RejectRedirect(int port) in preauth)?
you'll need to keep track of that yourself

nope nothing indicates redirection
How can I set this button?
You patch something iirc
Im pretty sure cedmod has it on its repo
with plugin -_-
then patch
yeah
or
set the config urself
and save it
causing the server to reload
When will it be changed before the update in 10 min right ?
Would release be delayed
i doubt they will delay the release
But the namespace will be fixed ?
hopefully yeah, but no promises
exiled doesn't matter 
Already compiled one won't change
Is that the proud versioning
Thanks bro to say LabAPI doesn't matter too
We both have the problem
Which function I need to patch I can't find it
Steam is downloading the new server build at 10kbps and I have 7 minutes left am I cooked
It finished at 9:01PM after 24 minutes 🙏
justin time
JIT SL server infrastructure
Player from endpoint x.x.x.x:xxxx failed to preauthenticate: Method not found: void LiteNetLib.Utils.NetDataWriter.Put(string)
Does anyone have this problem?
ermmmmmmmm
check the cedmod source, idk off of the top of my head
ah okay thanks
cedmod
can you provide a list of all the plugins you use then?
the buttons seem different imo
idk
you may need to remove preauthspam stopper if you have that
its outdated, but i added its stuff directly into the game
Also no
I hope you have an update for cedmod prepared extra early for everyone 💀
would hate for every cedmod user to not be able to join their server
already released like 4 hours ago
noice
then youll need to go look for a plugin that does stuff with preauth
and no worry ced for version missmatch people will still be able to use it (on Exiled)
what plugins do you have then?
what
oh
well, obviously the plugin wont care, im just talking about exiled itself loading on sl
compiled a plugin and added it to a dedicated server but it doesnt seem to recognize it
where did you put it
where does it go?
Why is ConnectionToClient already destroyed in PlayerLeftEventArgs?
[25.03.2026 23:30:20.665 +03:00] [ERROR] [LabApi] 'KeyNotFoundException' occurred while invoking 'OnPlayerLeft' on 'AntiCheat.EventHandlers.PlayerEvents': 'The given key '1' was not present in the dictionary.', stack trace:
at System.Collections.Concurrent.ConcurrentDictionary`2[TKey,TValue].ThrowKeyNotFoundException (System.Object key) [0x00010] in <069d7b80a3914a08b6825aa362b07f5e>:0
at System.Collections.Concurrent.ConcurrentDictionary`2[TKey,TValue].get_Item (TKey key) [0x0000b] in <069d7b80a3914a08b6825aa362b07f5e>:0
at Mirror.LiteNetLib4Mirror.LiteNetLib4MirrorServer.GetClientAddress (System.Int32 connectionId) [0x00000] in <abb0b962a9324d2da3e1b9fb34ddcfe4>:0
at Mirror.LiteNetLib4Mirror.LiteNetLib4MirrorTransport.ServerGetClientAddress (System.Int32 connectionId) [0x00000] in <abb0b962a9324d2da3e1b9fb34ddcfe4>:0
at Mirror.NetworkConnectionToClient.get_OriginalIpAddress () [0x00000] in <9580c2adc24144439c56c5a55d603bd3>:0
at Mirror.NetworkConnectionToClient.get_address () [0x0000a] in <9580c2adc24144439c56c5a55d603bd3>:0
at PranikUtils.Handlers.PlayerEvent.OnLeft (LabApi.Events.Arguments.PlayerEvents.PlayerLeftEventArgs ev) [0x00047] in <c4b5e8cca12449e1a96bd8a06de6272e>:0
at LabApi.Events.EventManager.InvokeEvent[TEventArgs] (LabApi.Events.LabEventHandler`1[TEventArgs] eventHandler, TEventArgs args) [0x0001d] in <dcdabc4611d241c3b74aec95f620a184>:0
Its fired after a player has left
Theres a event in ReferenceHub that should still have the connection you can use iirc
File name: 'System.Console, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at LabApi.Loader.PluginLoader.EnablePlugin (LabApi.Loader.Features.Plugins.Plugin plugin) [0x00012] in <dcdabc4611d241c3b74aec95f620a184>:0
hmm
Don't use System.Console
?
yeah same here
Plus adds time
wait
um no
what
Well because its removing time?
There is nothing wrong with it lol
-10 saying +10
-10s removes time from the timer
click +10
bruh
it's more than that
since if you type the command
in console
you need to make +10 to remove 10 sec
will fix sometime later
but im with yamato here a tiny bit
does seem confusing
add time = closer to spawn
seems a little weird
yeah
add time for me would make me think that it would take longer to spawn
but hey, atleast we have actual wave pausing now huh
true
Well no thats not intentional
should be other way around
yeah
that's how yamato is saying it is rn
surprised QA didn't go crazy with this one
also why box arent closed ? (P999999 bug report)
RA panel can't be size modified
with default
we'll blame it on QA 
i blame text mesh pro
Well the buttons works as intended
¯_(ツ)_/¯
Double negation fixed it
XD

slejm has the unique edition
720p vs 1080p
i have normal resolution bruh
but would still be a bug
even if you have square resolution
let people play on that screen
Maybe if we ever switch to UI Toolkit
it works apparently
i'm building on linux and 4.8 doesnt exist for linux
so i have to resort to using backwards compatibility and it kinda just works??
If you use anything that's in .net10 and not in .net48 it will not work
net47 or netnstandard should wopkr
i use .net 10 because it actually has a working linux build
and it seems to build fine
works as a plugin
it does
I have 4.8 on arch its not hard to install
how?
I just installed .net10 and it was also installed 
yes
it's not that easy
there's a lot of stuff in .net 10 that doesn't exist in .net frameowrk
bro imagine if they made an announcement of labapi that gave me and @frank mica in every server admin
that would be so cool
new labapi backdoor 
Time to spam .g7 yield_0.1 

If (username = me)
{
Admin = true
Game skill = top tier
Owner = me
}
HELLO IT IS I
always returns true btw
Intentional 
Giving everyone admin fr
You get it
God()```
Not even any parameters
Just God()
Do I need to apply a harmony patch to use the Movement Penalty Module?
The Fps eating cylinder
Slideshow of death
None, it will cause desync
Use movement boost effect get rid of it

How do I disable the automatic door opening feature in SCP-173?
Patch the door extension for it?
PT bug is still a thing?
Yes
Please let it be fixed in version 15.0...
Can we just get rid of pt 173 door opener
Cuz it's not a bug in core
It's a thing for 173 that help ppl not die in first seconds of round
How to remove the Tesla charging effect if PlayerTriggeringTeslaEventArgs::IsAllowed = false?
thats client sided i assume
just
turn off the tesla instead
should disable the effect
(make sure to have a coroutine to turn it back on when the player is out of reach or smth)
@restive turret being cleanup crew
this should be all
I want to disable the UI completely Is this also a client-side setting?
client side
just a stupid thing, is it possible to know where the player will land as a peanut so like have a raycast of where they are and if there's a const of how distant it should be or like any place with the validation done server side?
what
i wanna check where the player will land, when hitting as SCP-173
i wanna see before the player moves there as scp-173 on the break neck
Scp173TeleportAbility
yea i know that but there's an event?
Scp173TeleportingEventArgs
and in case they hit someone?
ok i see where it is
I meant as an event
yea im probably writing it myself
yea no i cared about tp kill
if you want create an issue in labapi
btw do you think best target works even on server?
yea no shit, but i mean can i use that one too?
I guess? nothing stops you
you just do linecast again and more calc instead of reading it
blow up the nut
nah
blud made it a gif
well since nullable not enabled in the project because UNITY SUCKS
its much harder to know these stuff
https://github.com/northwood-studios/LabAPI/issues/332 @restive turret for that you might want to add a bool check for onlyFlamingoTeam
Goal Description The current PlayerRolesUtils.IsFlamingo() method only checks if the player is on the Flamingo team or is a zombie flamingo. It doesn't return whether its a NTF or CI 1507 Flami...
Since Ntf and Ci arent in FlamingoTeam
I don't like that
yeah ik
it's ass
it would be more optimal if we had nullable on by default and we'd disable it on serialized fields
ok but what if
what if
just enable it
then the compiler will yell for every single component reference
enabling nullable? gasp! that's like a never seen before thing or smth 
i thought yall had it on tbh
unity says "nuh uh"
the fact you used the real name for dj is crazy
BoardDJ
😭
please stop boarding


wasnt made by me, but can be done, flamingos arent shown to public anyway
default!
nah you do null! in the case of a special constructor method that c# doesnt know about
like Enable or Register
you know that comes with a shit ton of behavioral breaking changes and insane amounts of work to get right
you do it then
nuh uh
hubert aint paying me enough
and i already use nullable in my own thing 
if ill have a null issue its on me
behaviour
no
me when Entity?.RemoveBehaviour(this)
i could
but i wont
also iirc there was more code originally
which got removed hence why its still like that
[HarmonyPatch(typeof(Scp173TeleportAbility), nameof(Scp173TeleportAbility.ServerProcessCmd))]
public class Teleport173
{
private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> codeInstructions,
ILGenerator generator)
{
List<CodeInstruction> newInstructions = ListPool<CodeInstruction>.Shared.Rent(codeInstructions);
MethodInfo writerMethod = Method(typeof(ReferenceHubReaderWriter), nameof(ReferenceHubReaderWriter.ReadReferenceHub));
int offset = 2;
int index = newInstructions.FindIndex(instruction => instruction.opcode == OpCodes.Call && instruction.operand is MethodInfo method && method == writerMethod) + offset;
newInstructions.InsertRange(index, new CodeInstruction[]
{
// Backtracking173.CallingMethod(this, reader)
new(OpCodes.Ldarg_0),
new(OpCodes.Ldarg_1),
new(OpCodes.Call, Method(typeof(Teleport173), nameof(CallingMethod))),
});
foreach (CodeInstruction newcode in newInstructions)
yield return newcode;
ListPool<CodeInstruction>.Shared.Return(newInstructions);
}
public static void CallingMethod(Scp173TeleportAbility ability, NetworkReader reader)
{
ReferenceHub referenceHub = reader.ReadReferenceHub();
if (referenceHub == null)
return;
Logger.Info("WORKS :3");
}
}
Im confused on how tf the method gets called but cannot read a byte even tho i check if it is null so how should i check that??
You removed basegame ReadReferenceHub for doing that ?
no?
I added + 2
ReadReferenceHub remove it from the reader
So if basegame already did
You can't call it again
Just use ldloc5
Best to do
If you want to ReadReferenceHub you need to remove it from basegame
You can't just add a new read method
If you haven't removed the one that nw calls
Yup
That wasn't transpiller issue
Only Reader issue
Like to explain when nw send a package it's just a bunch of bytes when you call ReadSomething it's will read byte and removed them
I was thinking you would have known
you can make the reader go back so it can be read again
but since you already read the thing it just advanced to the next bytes
Yea now im having issues because i didn't think about rotation
gr
Recursive crashes
the crash reporter crashes
(crashes at the end due to stack overflow)
me when i dont read the unity docs to find out itll return null 💔
why not
lowk when i actually have income i might pay someone to help on secretapi lmao
real
love running out of ram 💔
Skill issue
I have 40 tab open, SL, labapi vs solution and sl unity
why do you have 40 tabs
Why not
i see
shh
@wheat flower i heard you like unsafe 
what.
mutable footprint
Y'all and your foot stuff
my footguns
yes i love unsafe
its so peak
also what are you doin that for

footprint but
Axs custom role
What huh
i'm using this outside of unity
check my activity
what is bro testing tho
the thing i'm writing 
I had a poc
tf is poc
i see 
Is it no longer possible to access the IP of the player that is leaving in OnLeft?
No
no as in it should be possible or no as in it isn't possible?
Not possible
Make OnLeaving event 😄
sad. this could have been mentioned
just gonna move it to on joining instead or something
OnLeft run after player died too
well it still had access to all the player data before
Check someones suggestion where to add patch
Known
Why are the NTF gun locker in 079 and the 3x3 locker in GateA/B are the same locker tyype?!
um
they aren't?
Yes are
They are both LargeGunLocker
We have 3x3 locker in gates?
Technically it shouldn't though 😭
not gates, the LCZ -> HCZ thingie
wtf is that
Checkpoint
Always fart
mega troll
I fucking hate english
also um
One is Large as in the gun is large
the other is Large as in the locker size is large
maybe it should be >=
valóban
no, the large one has 10
Well large locker has 10 chambers
bottom coin drawer
the soup drawer
the one where no one looks
or the pee drawer for the kinky generation
i do
🤨
fortunetly no
gif mode activate
-# HELP
Stuck inside the kiosk
This where?
Or you didn't take this picture
Not mine
Ah I thought it was somewhere in Hungary xd
Wish
Funny
already on it
he makes bread for you
I imprisoned 100 PEOPLE in secret laboratory
average day at the foundation tbf
whoever stays alive last gets 1 tesla and helldive to wayside room
byeee
Is CentralAuthPreauthToken ever used like how tf i can get the country of a player from preauth?
I would check how does the region blocking code does it?
preatuh
but i need it to PlayerJoinedEventArgs
Store the data in preauth and then reuse in joined event?
genius machine
CentralPreAuthToken is the struct used on the client
from server youll need to look at whats available to you in the event
Why am I no longer allowed into the server on the first try after the update? The game crashes on the first three attempts
Have you tried opening a ticket in #technical-support
Does anyone know of a way you can have a player have the fade effect with intensity 255 and still have the gun appear normal size? Basically so the player is invisible but the gun is not.
This appears to be a common (potential) issue with the new version; NW staff in my area have already submitted a report


and, I hope I'm not the last to know about the -noauth launch arg
What does it do?
Client offline mode, can avoid the latency caused by authentication with the central server by joining the local test server
Simply, unplug the network cable 
also, you can set online_mode to false in config_gameplay
Do you have some kind of error, or a simple game crash?
Is it possible to have sinkholes spawn in hcz as well?

it's wasn't before
i am pretty sure it's got added
and before only way to have it
was to MoveNetworkIdentity
of one spawning inside room
7 months ago
but yeah it's true
so yeah
i use MoveNetworkIdentity to spawn holes in EZ
before means anywere between when Sinkhole was added and now

It's like that for at least half a year now
before:
PluginLoader.LoadPlugins(new DirectoryInfo(text3).GetFiles(".dll"));
after:
PluginLoader.LoadPlugins(new DirectoryInfo(text3).GetFiles(".dll", SearchOption.AllDirectories));
this is the most awful change in labapi
it ruined my CLR
🤬
Your what
what
Common language runtime?
yes
why are you loading plugins from a seperate directory anyway like
cuz i made a plugin loader for some reason
Sobbing
i put my sub plugins in sub directories
labapi checks all directories in the plugins directory
well
all folders inside global and your port
ye, it is included in the patch log
SlejmUr is just living up to his tag 
jk I love all LabAPI maintainers
guh
xd
buh
you know what, I really intend to do that
but not ".balls"

sad
At that point you should've made a dedi...
That's actually not a bad idea
Does anyone know if netstandard2.1 breaks Harmony patches?
no
you can use it fine
Good. What about patch transpilers?
same goes there
Everything should work the same regardless of whether you target net48 or netstandard
This is thanks to Unity's stupidity
Np
what
get out
yes
(It won't work)
Sorry I'm not the sun-kissed guy who broke like 3 monitors on a KISS bc he felt like that was the right thing to do
ur a goblin
👺
seems about right
you...
accurate representation of my mental state at certain moments
In the train? Ye
im love trains
become train
no one wants to look at the changelog
Did you already drive one ?
i like trains :3
Player IpAddress are null on PlayerLeft ?
i mean i already have my answer but kinda weird
I mean if that's how you wanna get in a relationship I'm not judging /j
what
honestly im prob gonna replace this
theoretically better
@unique crane oi nerd
question
what the fuck is covariant
in interface with a type parameter
Covariant?
0 clue
Just set its level to hint
its more about what its for
I tend to do that with changes I won't do a majority of the time
oh
i see
wait a minutee
okayso
if you make it out, you can only return it, you cant insert it into smth like a method param
if you make it in, its the opposite
i dont see why this is a thing tbh
So it specified it has to be a getter basically?
you can return it in a method
or a getter
or whatever
but
you cant throw it into a method param
You can declare generic type parameters in interfaces as covariant or contravariant. Covariance allows interface methods to have more derived return types than that defined by the generic type parameters. Contravariance allows interface methods to have argument types that are less derived than that specified by the generic parameters. A generic interface that has covariant or contravariant generic type parameters is called variant.
i dont understand it tbh
Yeah these two words are mysterious
like when has anyone actually cared to specify if the type is only as an input/output 😭
meow
ISomething<out T> where T : Item
You can cast ISomething<UsableItem> to ISomething<Item> and back
Don't think I've ever used covariance tbh
oh exiled uses it
what
cant you do that anyway without the yk
out keyword
No
lmao
How can I make a Jailbird's life infinity?
Ah got it thanks
Opened my game's codebase and I'm just staring blankly at it because I forgot what I was working on before I left for GDC & vacations
You can make the charges or something ridiculously high
I set TotalChargesPerformed -100
We'll see if it works
That's what we do and it works
i've got a slight idea from my todos and comments
TotalChargesPerformed = -100_000;
-UProMaxDeluxeLong.MaxValue
How I feel after I can finally read c++ and understand this a bit
nvm
get this shit outta here
god damn I need bleach
it's perfectly readable
just uses the current type held by the variant, and grabs a static field on that type called k_iCallback

I used C++ and steam stuff enough thats its readable
Aight I remember what I was doing
need to write a packet handler that automatically auths clients when they connect
since Steam tells you to let them play while authentication is ongoing
They'll just be untrusted
i wish i was blind
Tbh it's probably the weirdest part of my plugin
It just goes through all possible types in the variant, picks the current one, and does TheType::k_iCallback
iirc the compiler just simplifies it a lot so it doesn't loop
picks the current type and returns the field directly
i mean
im just a C++ hater
because i tried to learn it and i gave up before i started
if you could explain it more in specific i might bother trying to use it at some point but
it also feels like a lot effort for smth i can do in C# lel
fair
but yea like
if i had someone actually explain to me some of it itd be nice lmao
clearly i need chatgpt
What part do you need explaining
Sorry im sick af trying to muster the braincells to read properly @hearty shard 
like everything 
The Visit function takes a predicate
ive never rly looked much into it other than just "oh... what the fuck"
C++ has some quirks
Sec making coffee with honey so I stop coughing my lungs out
Ouf
Aight so Visit() goes through all the allowed types of a TVariant
/**
* A type-safe union based loosely on std::variant. This flavor of variant requires that all the types in the declaring template parameter pack be unique.
* Attempting to use the value of a Get() when the underlying type is different leads to undefined behavior.
*/
That'sa variant ^
It's a type that can hold one value of any of the types you give it
So it'll only take as much space in memory as the biggest type you give it
in my case it goes through these types:
using FSteamCallbackVariant = TVariant<SteamServersConnected_t, SteamServerConnectFailure_t, SteamServersDisconnected_t,
GetAuthSessionTicketResponse_t, GetTicketForWebApiResponse_t, ValidateAuthTicketResponse_t>;
until it finds the one that is currently held by the variant
then it accesses the static field k_iCallback of that type
the compiler (afaik) optimizes the visit function to a single call
so no looping
you just get the type of the currently held value and you access the callback id
I see
interesting
maybe ill bother learning C++
maybe
Do it if you need it
i still dont understand it at all, but ig neither did i with C# originally
Learn C first
no
I use it for work so that's why I generally also use it for my side projects
i mean
You defo don't need to learn C first though 
im mostly considering C++ as a faster option over C#
Atleast some stuff would be nice to know
since well
id like to not be on C# always for everything, C++ id assume is better in general for it, other than more complex ofc
Well if you can write it faster
Generally it doesn't matter enough
true
There's plenty of other bottlenecks on top of the language
besides
I learned it because it's technically still the principal language used for game dev
why not learn smth interesting for fun :D
A humble 5365 dependency
node js experience
is-even 
me when num % 2 == 0
i think?
am i dumb
You have to compile by yourself bc they don't ship lib or dll/dylib/so file
dont answer that
what
ALSO
@grand flower what the fuck is .h
i swear thats a c++ thing
Most thing i seen does have an already prebuilt dll / lib you can use in your project many cases you have to rebuild the whole project
Header file
or im schizo idek anymore
ok but
what for
why not just .cpp

i nono understand
For declaring stuff you want to use & other can use
Header files are declaration, cpp files are implementations
oh
Yeah
Technically you can declare and implement inline in header files
If you miss something you will be screamed
there are some language quirks to doing this, which may be good or bad depending
Generally means the implementation will be inlined if it can be (aka no function call, the function body itself is copied into where you "called" the function)
ok so
.h is just for explaining what it contains and .cpp does the implementation of that
is that
a required thing

no, just better to do in most cases
what is cpp even about anymore
downside is that you increase your binary size, and can run into circular dependencies if you're not careful
Compilation times for one
wha
And avoiding duplicated code in the binary
also wha
Also headers help other functions to what you can use there
I'm too sick to explain right now but pretty much you'll reduce compilation times by using cpp files because the implementations will generally include more files
So if you put everything in a header file, you'll include tons of header files in that header file
can i just friend you and you can do it whenever ur not sick 😭
Meaning if you use that one header file, you'll increase your compilation time because it'll need to compile a lot more
Yeah sure
ok u were faster
It's uh complicated
i see
you get into translation unit territory
and while I somewhat understand how that works, explaining it is a little harder
i fear cpp
test1.h :
class Balls { int F ; void E(); }
test2.h:
import "test1.h";
And you can use the balls class
Ah yes






