#plugins-dev-chat

1 messages · Page 159 of 1

unique crane
#

We dont have a official way to hide someone from player list

#

remember

celest thorn
#

It worked now it doesn't

unique crane
#

¯_(ツ)_/¯

#

Something may have changed somewhere

#

that broke it

celest thorn
#

...

#

im gonna shoot myself

celest thorn
unique crane
#

nothing I would know of

#

@upper vapor maybe

celest thorn
#

This worked

#

like until last update

upper vapor
#

check the local indexes and see if they match in the updated assembly-csharp
add [HarmonyDebug] to the class to print the outputted IL to the desktop

worn burrow
#

thanks

upper vapor
#

np

rapid saddle
#

Hi, I know this isn't necessarily the right place to ask but it seems the most appropriate, anyone have the most up to date version of SCP:SL servers for pterodactyl?

#

the egg

hearty shard
#

oh

#

the egg not the server i was about to say

rapid saddle
#

I mean, to create a server you need the egg

#

😭

hearty shard
#

yea i was gonna say

#

itd be weird to be sending all the files 💀

rapid saddle
#

I'm trying to get into LABAPI

hearty shard
#

parkeymon

rapid saddle
#

but I want to set up a test server

hearty shard
#

this should work

rapid saddle
#

Ahh it didn't look like it was up to date but okay thanks!

hearty shard
#

theyre the same in practice tho

#

one is a modified parkeymon the other is official

hearty shard
rapid saddle
#

Which would be an issue for me yeah?

#

since I'm trying to use plugins

hearty shard
#

didnt u say labapi

#

exiled is different and if ur just doing labapi it doesnt rly matter

rapid saddle
#

I wish I knew what the difference was

#

because it used to be something different from exiled a long time ago

hearty shard
#

labapi is official

#

exiled is not by nw

rapid saddle
#

Ah, which would be better to use?

#

I imagine LabAPI but I know the docs aren't finished since LabAPI isn't

hearty shard
#

it has some stuff missing like a 1509 wrapper but

#

its minor stuff tbh

rapid saddle
#

oh

#

the github is wrong then

#

" LabAPI
This documentation isn't finished as LabAPI isn't fully released yet."

hearty shard
#

tbf i dont think thats been edited much

rapid saddle
#

yuh

#

feb 10th

#

lmao

hearty shard
#

ur best source of info is the github source code

#

and uh

#

other plugins

rapid saddle
#

So is there a uh egg for vanilla SL or should I just install the exiled one

hearty shard
#

its what i use

#

i just didnt enable exiled

#

problem solved

rapid saddle
hearty shard
rapid saddle
#

yurh I saw it

#

Thanks 🔥

rapid saddle
cyan crown
#

i launched it vro

restive turret
#

i not gonna check rigidbodies

worn gull
#

No LabApi update today 🙁

restive turret
#

its a fast hotfix

#

some stuff got merged (I think)

ashen hound
stuck peak
#

I assume because it's not fully released yet and still being tested

hollow remnant
#

Are there any Events for Connection, like Requested challenge for incoming connection?

celest thorn
#

How can i check if a player was revived?

upper vapor
celest thorn
#

So if i check it on Spawned

#

it should be fine

upper vapor
#

which spawned

#

PlayerSpawned?

celest thorn
upper vapor
#

i'd recommend using RoleChanged unless you specifically wanna hook into the position set event

celest thorn
#

I can check on that ngl

#

it doesn't matter

celest thorn
grand flower
#

probs not a static

celest thorn
#

And so how do i get it from RoleChanged

grand flower
#

patch in your own event for when a player gets revived by 1509

celest thorn
#

that should do the job

grand flower
#

I suppose

#

As long as you don't override role assignment for any reason

#

in RoleChanging or whatever

celest thorn
#

Nah

#

Im checking in OnPlayerChangedRole

grand flower
#

aye

#

just hope we get an actual event in the future

upper vapor
upper vapor
#

or

#

Scp1509Item.List

celest thorn
#

List???

#

LabAPI?

upper vapor
#

yes

celest thorn
#

there's NO list

upper vapor
#

oh

celest thorn
#

im in latest labapi

#

there's no wrapper

#

there's nothing for it

upper vapor
#

😭

#

Item.List

#

filter by base

celest thorn
#
        if (ev.NewRole.RoleTypeId != RoleTypeId.Scp0492 && ev.ChangeReason == RoleChangeReason.Resurrected)
            return;

This does the job ig

upper vapor
#

are you doing this for 049 or 1509

celest thorn
#

1509 change reason is Resurrected

upper vapor
#

insane

#

yeah that works

celest thorn
#

and if its not 0492 Then that means he got resurrected BY the 1509

upper vapor
#

ya

restive turret
fathom charm
#

Hi. Is it possible to attach schematic to a player bone via transform?

unique crane
#

But not a specific bone

#

but you can give it local offset

#

it wont, however, match the rotation correctly

fathom charm
#

yep

#

know

#

but the problem is that the schematic will be attached to the root transform of the player, and because of this, it just hangs mostly in the air, not moving behind the animation (I don't really understand)

unique crane
#

Yeah

#

You wil need to match it with all sorts of animations

#

sorry...

fathom charm
#

Conventionally, I am now attaching schematic to the 096 "head", but it disappears after a second, I don't know why.

unique crane
unique crane
#

I dont think so

#

096's animations arent that wobbly

fathom charm
#
            SchematicObject.transform.SetParent(headTransform, false);
            SchematicObject.transform.localPosition = Vector3.zero;
            SchematicObject.transform.localRotation = Quaternion.identity;
            SchematicObject.transform.localScale = Vector3.one;

correct?

upper vapor
#

that seems fine

fathom charm
#

yep

upper vapor
#

MER issue? toomuchtrolling

#

society if MER let you specify the parent

fathom charm
#
            Transform model = Player.Transform.Find("SCP-096 Model Halloween(Clone)");
            if (model == null)
            {
                return;
            }
            Transform headTransform = FindChildRecursive(model, "head");
            if (headTransform == null)
            {
                return;
            }
        public static Transform FindChildRecursive(Transform parent, string name)
        {
            foreach (Transform child in parent)
            {
                if (child.name == name)
                    return child;
                Transform found = FindChildRecursive(child, name);
                if (found != null)
                    return found;
            }
            return null;
        }

i think is this not correct to get the transform component

upper vapor
#

again, you can't parent it to a specific transform component in the player

fathom charm
#

Although not... if the schematic appears and disappears after a second, then everything is correct.

upper vapor
#

you must attach it to the player's gameobject and offset it

upper vapor
#

btw you can access the character model via IFpcRole.FpcModule.CharacterModel

fathom charm
#

o

#

i will try it

#

thx

fathom charm
#

bruh

sacred sierra
fathom charm
#

Not tested with hitbox

sacred sierra
#

in a coroutine

fathom charm
#

ok, i will test it

spare zodiac
#

they have transform

spare zodiac
restive turret
fathom charm
sacred sierra
fathom charm
#

or just bones will be recreated at least in one frame

spare zodiac
spare zodiac
sacred sierra
sacred sierra
# spare zodiac yes

cant see why would it be better if its a lot easier to just use coroutine with like delay parameter

spare zodiac
upper vapor
#

-# not really a headache but easy to miss

spare zodiac
#

yeah monobehaviour automatically destroys every loop

upper vapor
#

what

spare zodiac
#

when object is destroyed

upper vapor
#

yes

#

not every loop

sacred sierra
upper vapor
#

that works too

#

not sure why you need the lookahead though

sacred sierra
upper vapor
#

ye

#

also

#

shouldn't you be doing

#

Timing.WaitForSeconds

royal mica
#

Are you changing the delay btw? Why is it parameterised

upper vapor
sacred sierra
sacred sierra
upper vapor
#

going through what

sacred sierra
#

through player

restive turret
#

Tru my head

sacred sierra
#

and you could see it if you run backwards

upper vapor
#

right

upper vapor
#

that's really cool

fathom charm
#
    internal class SchematicComponent : MonoBehaviour
    {
        internal Player Player;
        internal SchematicObject SchematicObject;
        internal Transform _transform;
        internal IFpcRole FpcRole;
        internal void Initialize(Player player)
        {
            Player = player;
            Vector3 offset = new Vector3(0.1f, 1f, 0.2f);
            SchematicObject = ObjectSpawner.SpawnSchematic(Mask.Plugin.Config.SchematicName, Player.Position + offset, Quaternion.identity);
            if (!(Player.Role.Base is IFpcRole fpcRole) || !(fpcRole.FpcModule.CharacterModelInstance is AnimatedCharacterModel animatedCharacterModel))
                return;
            FpcRole = fpcRole;
            _transform = FindChildRecursively(animatedCharacterModel.transform, "head");
            if (_transform == null)
                return;
        }
        public static Transform FindChildRecursively(Transform parent, string childName)
        {
            foreach (Transform child in parent)
            {
                if (child.name == childName)
                    return child;
                Transform result = FindChildRecursively(child, childName);
                if (result != null)
                    return result;
            }
            return null;
        }
        private void LateUpdate()
        {
            if (SchematicObject == null || _transform == null || Player == null)
            {
                Destroy();
                return;
            }
            Vector3 playerVelocity = FpcRole.FpcModule.Motor.Velocity;
            Vector3 predictedPosition = _transform.position + (playerVelocity * 0.024f);
            SchematicObject.transform.position = predictedPosition;
            SchematicObject.transform.rotation = _transform.rotation;
        }
        private void Destroy()
        {
            SchematicObject?.Destroy();
            Destroy(this);
        }
    }

Code just fast placeholder

frosty bobcat
#

how does the auto team killing banning work?

#

like after how many team kills does someone get banned

hearty shard
#

@frosty bobcat

#

its 6

#

4 in a life, 6 in a round

fathom charm
#

Does anyone know the transforms names that start the IDLE animations of classes?

#

I found for D-class, and SCP-096

upper vapor
#

either print the hierarchy into the console or extract the assets with AssetRipper

fathom charm
#

i printed hierarchy

slate flume
#

You know sometimes the effects apply for an item but ItemUsed event never procs

#

Pmo

grand flower
#

Happens if you spam another item equip keybind

slate flume
#

Which means it could be caused by things like 3114's strangle

grand flower
#

yeah

stable hawk
#

guys when I try to do Player.GetAll() i get FileNotFoundException' occurred while invoking 'OnServerCommandExecuting' on 'CustomHandler': 'Could not load file or assembly 'System.Linq, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

#

and when putting using System.Linq at the top of my Events.cs file vscode says it goes unused

worthy rune
stable hawk
#

my .csproj file says the targetframework is net9.0 if that's the right one

#

dotnet --info shows 9.0.6

worthy rune
#

you will need to change to .net framework 4.8

stable hawk
#

how do i do that

#

just download 4.8 from microsoft

worthy rune
stable hawk
#

do i get the developer pack and runtime or just one

worthy rune
#

changing from 9.0 to 4.8 im not too sure about, might be easier to create a new project

worthy rune
stable hawk
#

ill download both just in case

stable hawk
#

but idk

worthy rune
#

yeah worth a shot

stable hawk
#

alr that worked

#

ty

#

is there an easier way to reload plugins besides restarting the server?

stable hawk
#

how do I set a dummy's role? like whether it's an SCP or human, etc.

#

nvm figured it out

teal junco
#

i just saw the funniest shit ever from a server manager

#

he basically in short was implying that exiled and labapi were mutually exclusive until recently

#

no idea how he thinks this while running an sl server

#

i so bad wanted to correct him but thats just a dick move

upper vapor
teal junco
#

most of my new projects are made using an SCP SL template i made

#

which was created from a modern .net class lib downgraded to .net framework

#

it makes it way nicer

upper vapor
#

Exactly

teal junco
#

maybe i'll add base folders to my template as well

teal junco
upper vapor
teal junco
#

does he know labapi is part of SL and also what Exiled currently loads off of?

teal junco
#

they should delete the EXILED installer exe and make all server hosts install it manually

upper vapor
#

Genuinely
Tell me how can people be this confident at being wrong

teal junco
#

i dont mean this in a rude way i think thats just what happens

teal junco
#

but it makes funny anecdotes for me

#

so be as ignorant as you want

#

in return, i will be as ignorant as you, and you can enjoy me as much as i enjoyed you.

teal junco
#

but i think these tools should be as accessible as possible

upper vapor
#

Okay but tell me why it's like 50 MB for an installer like this

teal junco
teal junco
teal junco
#

i dont really judge people for being ignorant about basic tech stuff, not really, but i cant deny its really funny when someone who's supposed to know it doesn't

#

i hear a lot of stories from professionals about the same thing but higher stakes

warped prairie
#

im just stupid, but at least i can accept it sometimes pepeLA

teal junco
#

im stupid, mid dev, and i am much too arrogant to accept my own mid-ness

stable hawk
#

Also, I’m trying to set the role of a dummy to 079, but in RA, the role shows up as white and not red. I’m trying to set the role before the round starts, but even trying to set it after the round starts doesn’t work

mild ice
hearty shard
#

get away

upper pike
#

Spooky season is over :(

stable hawk
#

I can set other dummies as every other scp but I just can’t set 079

copper plume
#

how the hell do u use speaker toys

upper vapor
alpine glade
upper vapor
copper plume
#

how would i load audio from a file?

upper vapor
stable hawk
mild ice
upper vapor
hearty shard
alpine glade
copper plume
upper vapor
#

I linked my library if you wanna use that

#

It can load mp3, wav and ogg files

#

By using a library you don't have to deal with loading files manually, nor the encoding & sending AudioMessages part

copper plume
#

How would i encode it myself if i didn't use your library?

upper vapor
#

SL has an OpusEncoder wrapper

#

But sending audio is a bit finicky

#

You'd need to send an AudioMessage once every 10ms, it has to be 48000 Hz mono = 480 samples/message

copper plume
#

Alr thanks

hearty shard
#

ax!!!

#

@alpine glade poopyhead

alpine glade
#

How did i misspell it

hearty shard
#

cuz u suck

royal mica
#

you can just convert mp3 to ogg

alpine glade
hearty shard
alpine glade
#

noo

icy knoll
royal mica
royal mica
icy knoll
#

ogg has higher quality audio so i’ll always opt for it, i don’t use mp3 for audio anymore lol

royal mica
#

Fortunetly a single mp3 -> ogg saves a lot of headaches

#
            var speaker = getSpeaker(player);
            using var reader = new VorbisReader(oggPath);
            int sampleRate = reader.SampleRate;
            int channels = reader.Channels;
            float[] samples = new float[sampleRate * channels];
            reader.ReadSamples(samples, 0, samples.Length);
            speaker.Play(samples, false);
upper vapor
upper vapor
#

Plus no need to convert to ogg when you can use NLayer

#

Also I really don't like how people load entire songs into memory

upper vapor
#

Wdym no

#

😭

royal mica
#

what I posted is enough

#

like I do nothing else

upper vapor
#

Yeah

#

Labapi does the encoding right

royal mica
upper vapor
#

I forgor

upper vapor
royal mica
#

yup

upper vapor
#

"I hate dependencies raaaahhhh"

royal mica
#

LabApi.Features.Audio.AudioTransmitter

royal mica
#

you are the labapi maintainer, implement it xdx

upper vapor
#

the a

royal mica
upper vapor
#

It's probably gonna stay as "later to do"

royal mica
#

most probably

#

I assume there are waay more prio tickets to do

upper vapor
celest thorn
#
                   mov     r1,#144
                   mov     r2,#8

                   mov     r0,#0

multiplication     

                   cmp     r2,#0
                   beq     end_multiplication

                   add     r0, r0, r1
                   sub     r2, r2, #1

                   b       multiplication

end_multiplication 

@upper vapor compiler is compiling

upper vapor
#

You're compiling?

celest thorn
upper vapor
#

Yes

celest thorn
#

this is assembly

upper vapor
#

I guessed

celest thorn
#

amazing that this is just for doing a multiplication

#

because the software we use

upper vapor
#

No mul?

celest thorn
#

doesn't support multiplication or division

#

but im compiling

#

if i wrote it in c most likely it would be so optimized

#

me vs C compiler

upper vapor
#

How does a C multiplication compile for this set then

celest thorn
#

thats it

upper vapor
#

Yeah but if you have no mul

celest thorn
#

this does the same thing

upper vapor
#

Yeah

#

Does gcc do that

celest thorn
#

it uses mul

#

i just checked in ghidra

upper vapor
#

How does it use mul if there's no mul 😭

celest thorn
#

Because im using an emulator

#

of ARM assembly

upper vapor
#

I'm too high to understand this

icy knoll
upper vapor
#

😭

#

Smoke stackalloc every day

celest thorn
#

AHAHAHHAHAAH

#

atleast im not doing divisions with like cables

#

and gates

#

i mean im doing that

#

but the pc is doing it for me

hearty shard
#

@upper vapor is there a known bug around 3114 strangle

#

im too lazy to check but

#

on an official server i saw 3114 move while strangling

#

mostly in circles of the strangled person but thats it rly

celest thorn
tulip kiln
#

Does anyone know how can I detect when a grenade goes through an open door in CollisionDetectionPickup::OnCollided? I'm using it to explode the grenade on impact, but it seems to be called when colliding with room geometry as well. Going through an open LCZ door will report the other collider as LCZ_T_Room_Collision, but I can't exclude it based on this naming scheme, since wall collisions are also handled by objects of this name. They are also on Layer 0 Default, so layer exclusion is also not an option. I attached an image of where the grenade is last seen before exploding. Does anyone have an easy way to only include walls in this?

royal mica
#

Since you are using the OnCollided anyway

#

Do not know how fast would that be though

tulip kiln
#

Speed is of no concern here. I've gone through all components of the collider, its parent and its children. It has no door attached to it.

[2025-11-03 16:45:20.750 +01:00] [INFO] [RoleplayPack] Hit gameObject LCZ_T_Room_Collision (layer: 0, Default)
[2025-11-03 16:45:20.764 +01:00] [INFO] [RoleplayPack] Component found: Transform
[2025-11-03 16:45:20.779 +01:00] [INFO] [RoleplayPack] Component found: MeshCollider
[2025-11-03 16:45:20.805 +01:00] [INFO] [RoleplayPack] Component found in parent: Transform
[2025-11-03 16:45:20.830 +01:00] [INFO] [RoleplayPack] Component found in parent: MeshCollider
[2025-11-03 16:45:20.856 +01:00] [INFO] [RoleplayPack] Component found in parent: Transform
[2025-11-03 16:45:20.870 +01:00] [INFO] [RoleplayPack] Component found in parent: Transform
[2025-11-03 16:45:20.886 +01:00] [INFO] [RoleplayPack] Component found in parent: Transform
[2025-11-03 16:45:20.902 +01:00] [INFO] [RoleplayPack] Component found in parent: RoomIdentifier
[2025-11-03 16:45:20.917 +01:00] [INFO] [RoleplayPack] Component found in parent: CullableRoom
[2025-11-03 16:45:20.932 +01:00] [INFO] [RoleplayPack] Component found in parent: SpawnableRoom
[2025-11-03 16:45:20.947 +01:00] [INFO] [RoleplayPack] Component found in parent: Transform
[2025-11-03 16:45:20.963 +01:00] [INFO] [RoleplayPack] Component found in parent: Transform
[2025-11-03 16:45:20.978 +01:00] [INFO] [RoleplayPack] Component found in parent: StaticBaker
[2025-11-03 16:45:20.994 +01:00] [INFO] [RoleplayPack] Component found in child: Transform
[2025-11-03 16:45:21.009 +01:00] [INFO] [RoleplayPack] Component found in child: MeshCollider
royal mica
#

oh wait I see what is happening here

#

LCZ_T_Room_Collision isn't the room itself? What is the collider name when you hit a wall

tulip kiln
teal junco
#

how can i get the outward normal of a surface i raycast on

royal mica
hearty shard
#

i believe they did this for CT

tulip kiln
#

Who is trub and what is CT though

hearty shard
#

@rugged laurel ^^

#

chaos theory

tulip kiln
#

Now all that's left is to wait if she will share or not 🙏

rugged laurel
hearty shard
#

gulp

hearty shard
rugged laurel
#

Seems what iv done isnt exactly what they want

hearty shard
#

yeahh

#

i thought you did what they asked for tbh

rugged laurel
#

Since they mentioned walls

#

But im also half asleep

hearty shard
#

nono

#

ur not half asleep

#

ur fully asleep

#

this is all a dream

rugged laurel
#

I just used the dot product to check if ur hitting from above

tulip kiln
#

I see

#

thanks for replying though 💜

slate flume
#

When I made an impact grenade I subscribed to OnCollided and had it explode when it detected a collision

#

You were able to shoot it through open doors

tulip kiln
#

The problem I have is that when the grenade is coming through an open door, it detects a collision and explodes

#

Which should not happen

slate flume
#

There's a cool fix for that

#

The colliders for the doors can be a little wonk

tulip kiln
#

The issue is, the collide event reports that the grenade is hitting the Room collision and not the door

slate flume
#

There's a fix

#

I'm finding it rq

tulip kiln
#

ty

slate flume
#
public class CollisionComponent : MonoBehaviour
{
    private TimedGrenadeProjectile _grenade = null!;
    private readonly List<Vector3> Velocities = [];
    public void Init(TimedGrenadeProjectile grenade)
    {
        _grenade = grenade;

        _grenade.Base.OnCollided += collision =>
        {
            if (collision.contacts[0].normal.y >= 0.7f ||
                Vector3.Dot(Velocities[^1], _grenade.Rigidbody!.linearVelocity) <= 0.99f)
                _grenade.RemainingTime = 0; // Note: don't use ServerFuseEnd! This causes multiple explosions because collisions tend to detect multiple times before the grenade is destroyed
        };
    }
    public void FixedUpdate()
    {
        Velocities.Add(_grenade.Rigidbody!.linearVelocity);
        if (Velocities.Count > 5)
            Velocities.RemoveAt(0);
        if (Vector3.Dot(Velocities[0], Velocities[^1]) <= 0.5f)
            _grenade.RemainingTime = 0;
    }
}
public static class GrenadeCollision
{
    public static void ExplodeOnImpact(this TimedGrenadeProjectile grenade) => Timing.RunCoroutine(Add(grenade));

    private static IEnumerator<float> Add(TimedGrenadeProjectile grenade)
    {
        yield return Timing.WaitForOneFrame;
        yield return Timing.WaitForOneFrame;
        yield return Timing.WaitForOneFrame;
        grenade.GameObject.AddComponent<CollisionComponent>().Init(grenade);
    }
}

This is what I did

#

It tracks the velocity of the grenade every frame and checks if that velocity has dramatically shifted, if so it blows the grenade up

#

It's actually two separate checks, and they only run when a collision is detected

tulip kiln
#

Hm, clever.

#

I'll try that

slate flume
#

The first check collision.contacts[0].normal.y >= 0.7f essentially just checks if it's hitting a floor, if so it's a guaranteed explosion

#

Otherwise it compares velocities

#

The one other check I have is in FixedUpdate Vector3.Dot(Velocities[0], Velocities[^1]) <= 0.5f which checks if the velocity has dramatically shifted from five frames earlier

#

Sometimes each frame has a small collision and it compounds into a large shift, so having that five-frame window keeps it in check

#

Took a lot of trial and error

#

If you paste that code in your codebase all you have to do is take the TimedGrenadeProjectile grenade and go grenade.ExplodeOnImpact();

#

If you want to get the coroutine and cancel the impact grenade stuff, you can make ExplodeOnImpact return the CoroutineHandle instead of void

#

This code works for me with grenade launchers and mirvs so it should work for you

tulip kiln
#

I just implemented it and it works like a charm

#

tysm 💜

teal junco
#

more specifically im looking at placing a paper on a wall

royal mica
#

normalise the Vector3 that directional to the origin of the object

#

that goes inwards, if you reverse the Vector3 then you get outwards

teal junco
#

so that will get me the normal of a wall for instance

royal mica
#

if my mind is correct yes

grand flower
#

sec

#

i made a command on Bright's for that

#

mostly because I needed to place stuff on the map

royal mica
#

that is easier, if someone already done it :D

grand flower
#
using System;
using System.Text;
using BrightPlugin.Utils.Extensions;
using CommandSystem;
using LabApi.Features.Wrappers;
using PlayerRoles.FirstPersonControl;
using RemoteAdmin;
using UnityEngine;

namespace BrightPlugin.Commands;

[CommandHandler(typeof(RemoteAdminCommandHandler))]
class Waila : ICommand
{
    public string[] Aliases { get; set; } = Array.Empty<string>();

    public string Description { get; set; } = "What am I looking at?";

    public string usage { get; set; } = "waila";

    string ICommand.Command { get; } = "waila";

    public bool Execute(ArraySegment<string> arguments, ICommandSender sender, out string response)
    {
        var player = Player.Get(sender);
        if (sender is PlayerCommandSender && player is not { RemoteAdminAccess: true })
        {
            response = "You do not have access to this command.";
            return false;
        }

        if (!player.IsValid())
        {
            response = "Only players may use this command";
            return false;
        }

        if (player!.RoleBase is not IFpcRole)
        {
            response = "You must be playing as a human role.";
            return false;
        }
        
        // Cast a ray from the player's camera, into the first gameobject we can hit.
        // We'll display information it.
        // We'll also want to go a little away from the player's camera otherwise we'll hit it.
        var position = player.Camera.transform.position + (player.Camera.transform.forward * 0.2f);
        var ray = new Ray(position, player.Camera.transform.forward);
        if (!Physics.Raycast(ray, out var hitInfo, float.MaxValue))
        {
            response = "You're looking at nothing.";
            return false;
        }

        var sb = new StringBuilder($"Hit Position: {hitInfo.point}\n");
        sb.AppendLine($"Hit Normal: {hitInfo.normal}");
        sb.AppendLine($"GameObject: {hitInfo.transform.gameObject.name}");
        sb.AppendLine($"Layer: {LayerMask.LayerToName(hitInfo.transform.gameObject.layer)}");
        sb.AppendLine($"Position: {hitInfo.transform.position}");
        sb.AppendLine($"Rotation: {hitInfo.transform.rotation}");
        sb.AppendLine($"Relative Position: {hitInfo.transform.InverseTransformPoint(hitInfo.point)}");
        sb.AppendLine($"Relative Rotation: {hitInfo.transform.TransformDirection(hitInfo.normal)}");
        
        // Try to find the room the position is in.
        if (Room.TryGetRoomAtPosition(hitInfo.point, out var room) && !room.IsDestroyed)
        {
            sb.AppendLine($"Room: {room.Name}");
            sb.AppendLine($"Relative Position: {room.Base.transform.InverseTransformPoint(hitInfo.point)}");
            sb.AppendLine($"Relative Rotation: {room.Base.transform.TransformDirection(hitInfo.normal)}");
        }
        else
        {
            sb.AppendLine($"Room: NONE");
        }

        response = sb.ToString();
        return true;
    }
}
#

@teal junco

teal junco
#

Thanks a lot

#

youre the goat

#

Also i cant believe i forgot hitinfo has normals

teal junco
#

waila 🔥

slate flume
stone prawn
#

plugins are built with net4.8? the wiki shows features that are not in 4.8

icy knoll
#

what is missing but shown in the wiki?

stone prawn
#

ah oki

#

i forgor

#

this is what i meant

icy knoll
#

that's c# version

#

change the LangVersion in your csproj

#

i recommend 13 or preview

stone prawn
#

okay, thanks

#

im surprised i never ran into this issue and knew this was a thing, the downside of self teaching and figuring out c# Kek

slate flume
#

I use extension members all the time

#

And by all the time I mean like I make one a week

#

Which is pretty much all the time

stable hawk
#

doing the command from in-game doesn't complain in the RA console or the client console (~)

#

wait

#

scp-079 exists

#

causing an overcharge causes 079 to die

teal junco
#

compound V ported to LabAPI!

#

if only the custom item would work

barren pasture
#

How do I change someones appearence without changing their actual role?

upper vapor
upper vapor
plain gazelle
#

Would it be possible to actually have, or make it look like a Pickup Firearm fired itself?

#

Mostly wondering about sfx and vfx of the shot(s). Whether or not it actually deals damage is irrelevant

royal mica
royal mica
upper vapor
royal mica
#

the server is beginning to believe

#

WOULD LIKE TO TEST IT IF THIS SHITHEAD WOULD ANSWER

royal mica
upper vapor
#

this is for automatic firearms ofc

plain gazelle
#

This would be so awesome
thanks

upper vapor
#

np

upper vapor
celest thorn
#

hiii chat

restive turret
#

Hi cat

spare zodiac
#

hello sirs

celest thorn
celest thorn
#

how you guys doinggg

spare zodiac
celest thorn
#

i instead rn coding the twitch api for my server that will be able to reply to messages and do other cool stuff

#

having a command handler

restive turret
#

Nice

celest thorn
#

its increible hard to tho get an access token

#

seriously

spare zodiac
celest thorn
#

Messages
Cheers (idk what the fuck they are)
Sub (When you get a sub)
Raid (when someone raids)
Donations
Some Updates for the chat

#

this is everything i can check

#

and do

restive turret
#

Can't you do something thst involves the channel points

celest thorn
#

i need to see if IRC works with that

royal mica
#

There are IRC bots that interract with that, I use chatterino and that uses IRC to communicate IIRC

hearty shard
#

hi slime boy

restive turret
#

Hi evil

hearty shard
#

oh...

celest thorn
#

YIPPE

celest thorn
#

i need to subscribe to pubsub

#

ngl i will not DO THAT

#

it required 20 more additional

#

ig commands are fine

eager cove
#

who kwon where i can get LabApiExtension.dll?

celest thorn
#

Thats a plugin or a dependency of some kind

eager cove
#

dependency

celest thorn
#

Maybe @restive turret

#

Knows because he made one

#

Or probably his own

hearty shard
restive turret
#

Ye

hearty shard
#

ah kadavas

upper vapor
#

Me when the dependent plugin's installation steps should tell you where it is

restive turret
#

It says it tho

hearty shard
#

secretapi doesnt have this for harmony

restive turret
#

Put in dependency

hearty shard
#

the dependant

restive turret
#

Ah in website?

hearty shard
#

idk!

restive turret
#

Me neither!

upper vapor
hearty shard
#

oh.

#

ok!!!

#

if u say so!

restive turret
#

Me when secret is no more api

hearty shard
restive turret
gilded plover
#

is there a way to force a spawnwave to happen on a vanilla server?

restive turret
#

Ye

#

wv spawn ntf true

#

Or close to this

teal junco
#

the number of times ive seen people testing waves by waiting for it is about two too high

gilded plover
restive turret
#

Also how would you dynamicly do it

unique crane
restive turret
#

Since you can add custom waves

#

(i did it so its possible :P)

unique crane
#

I can, however, add them back

#

buuuut

#

Yea

restive turret
#

Buttonys

unique crane
#

not a priority or anything

teal junco
#

idk

unique crane
#

adding just the base ones

#

handle the customs yourself lol

restive turret
#

Idk how it works tho, I only interacted with server side

teal junco
unique crane
#

RA buttons are like any UI

#

they just trigger commands

teal junco
celest thorn
#

I know you guys love adding buttons for the RA

restive turret
#

Well search for it, I learned the wave command like 4 months ago

teal junco
restive turret
#

☠️

unique crane
#

RA isnt made for custom components

#

sorry buddy

#

use the dummy actions

teal junco
#

dummy actions is actual peak

celest thorn
unique crane
teal junco
#

i mean ive never installrd the dummy actions plugin buttt

unique crane
#

every client-server comm in RA is a fucking plaintext

teal junco
#

it sounds awesome

celest thorn
#

I know you guys love overlaying

#

New images

teal junco
restive turret
#

I dont even remember the old wave ui

teal junco
#

i do

unique crane
#

WHAT THE FUCK MAN

teal junco
#

mostly cause i wrote a custom wave system for a server i was on

unique crane
#

Where is some plugin to remove AIahh mode and goldfish attention span buttons

restive turret
teal junco
#

short videos?

#

i literally remove youtube shorts from my feed on purpose why would they add it somewhere else

restive turret
#

Cus google is shit company

unique crane
#

no need to thank me

restive turret
#

I use duckduckgo

#

So it should never show up

teal junco
#

dont worry, if i become a google engineer i will not fix anything

unique crane
#

No thanks

restive turret
#

If you go there make sure you change a lot of tos and bring back the dislike button

unique crane
#

Nor microsoft

hearty shard
#

david

#

r u brainrotted

unique crane
#

I dont want to Vibe Code Task Manager

restive turret
#

Ye ms is bullshit

unique crane
#

for it to never close again

unique crane
#

I dont have tiktok

#

I have hide shorts plugin

restive turret
teal junco
#

i also do that and my brain is rotten

restive turret
#

r u?

unique crane
#

and I tell people to shut the fuck up with brainrot

hearty shard
hearty shard
teal junco
unique crane
#

I suggest this btw

teal junco
#

r u one of those people who think 67 is the downfall of humanity

#

(which it is but not for the reasons most think)

restive turret
#

I am one of those people who dont even know what that means

unique crane
teal junco
#

i think its a reference to an athlete's height, a song, and a kid at middle school basketball

restive turret
#

I just ignore it lol

hearty shard
#

a kid said 67

teal junco
#

at least it isnt like a dogwhistle

hearty shard
#

and then everyone copied

teal junco
restive turret
#

But if I say "huh?" that tracks

teal junco
#

i see too many philosopher kids freaking out about six-seven

#

its really funny how so many people think theyre cool because they look down on all of their peers for making a popular joke

unique crane
#

AI ahh

restive turret
#

Al jokes

unique crane
upper vapor
#

Delete what

unique crane
#

A short video

upper vapor
#

Shorts?

unique crane
#

Pure evil

upper vapor
#

I wanna keep my shorts

stable hawk
slender depot
#

Why doesn't PlayerEvents::PickingUpItem get triggered when you pick up an armor?

#

I mean an armor is an item

#

I know that there is PlayerEvents::PickingUpArmor

#

But why doesn't the pickingupitem get triggered?

upper vapor
#

it's probably implemented in a different search completor

#

if you wanna run the same code, you can make a generic method that accepts T : IPickupEvent

#

or pass the pickup

gilded plover
#

what if the server browser wasnt extremely outdates and you could actually filter by language and specific player amount

#

its been the same for so long and it lacks alot of features

upper vapor
gilded plover
#

oops i just realized what channel im in

upper vapor
#

yeah the server browser could definitely use a redesign

gilded plover
#

maybe english sl wouldnt be so dead if you could actually find eu servers to play, theyre all inbetween polish and russian servers

hearty shard
#

brainrot

#

@restive turret whats up slime biy

#

Boy

#

R u asleep

restive turret
hearty shard
#

damn...

restive turret
#

Why

#

Cant a university student drink

#

Im not that drunk tbh

#

I just got home (safely dw)

#

My car currently purring next to me (he misses me all the time) [such a cutie]

#

Anything you request, want or smth @hearty shard ?

hearty shard
hearty shard
restive turret
#

Nor disclose publicly

hearty shard
#

Gr...

restive turret
#

:P

#

I can only say, many cool stuff will be there

#

As in most update

hearty shard
restive turret
#

Skill issue?

hearty shard
#

I've played the update once

#

14.2

#

um

#

i mean i did a bit of testing to check it out ig but actual game play? Like an hour

restive turret
#

¯_(ツ)_/¯

#

I don't play daily either, I only did play is like 6h or something

#

Anything gn evil

hearty shard
unique crane
teal junco
#

mostly a friend pushes me to play with him

#

thats been my main motivation to get on SL lately, besides making plugins and working on my server.

grand flower
#

i only open it to fix Bright's

soft depot
#

Can you also either implement Cyn’s solution for client side patenting of network identities to non network identities or make RPC’s to parent NI’s to common client objects like my suggestion?

teal junco
#

he only do it if eve asks

#

you have to get her to ask

hearty shard
#

guh...

#

i wont ask for it

#

i will however ask for cheese

#

i want cheese added to sl

#

Make it edible

teal junco
#

NOOO

#

well

#

if they add client side parenting to non-network identities

#

you can put a cheese on your head

#

and you can have a cheese-o-meter with a detailed graphic if the tmp mesh covered the entire screen

hearty shard
#

Oh...

#

Good point

#

Please add this

upper pike
#

@upper vapor
Hey mate. Playing around with your audio library but Im struggling with skipping to the fadeout at the end of the file when given an audio player. Any ideas?

soft turtle
#

How to change text in TextToy?

            textToy.Arguments.Reset();
            textToy.Arguments.Add(messageJoined);
            textToy.TextFormat = "<color=#00FF00>[Chat]</color> {0}";
soft depot
#

set NetworkTextFormat instead of TextFormat

upper vapor
upper vapor
#

You need to store a reference to the wave stream and set its CurrentTime

upper pike
#

No way to pull the stream from the audioPlayer?
I was hoping to just pull the audio player from the gameobject's children

celest thorn
#

same item changed id from when created???

#

not even dropped

restive turret
#

What

celest thorn
restive turret
#

I don't even know what you saying

#

So I'm double

grand flower
upper pike
#

You mean like the item serial changed?

celest thorn
celest thorn
#

randomly

#

it happens randomly

upper vapor
#

You can attach a component and store it in that

upper pike
#

Alr, thanks

upper vapor
upper pike
restive turret
#

It shouldn't do that i guess

celest thorn
#

Obv????

#

the problem is WHY it happens

#

in that frame nothing is done

restive turret
upper pike
#

My guess is custom keycards are weird

restive turret
#

Or your code is weird

upper vapor
#

Xd

#

Try adding normal Keycards

restive turret
#

My custom items api works with serials

#

And works for me

celest thorn
#

it happens randomly

#

just like in a second its an id then it changes

restive turret
#

Send the first one what do do, what is item2

upper pike
#

Leak your entire code Troll

celest thorn
#

the ID is correct

#

because when i drop it, it works as intended

#

but when it gets to the inventory it changes ID?

#

wtf

#

this game is cooked

restive turret
#

Or your code is cooked

upper pike
#

Do you think its a bit flag?

celest thorn
restive turret
#

It works on my Custom Items

celest thorn
restive turret
#

Never had any issue with wrong serials

celest thorn
#

But you can see this is something wrong with it?

#

no?

#

im taking the serial from labapi

#

and a second after it changes

upper pike
#

Going to be honest. I never printed my serials.
I just put them in and it worked

#

Never checked

restive turret
#

I dont even see what the hell is in before the tryget i dont know if you even get the right item

celest thorn
#

before that there's just a foreach for everyitem

#

but that doesn't matter at all

upper pike
#

What's in the foreach?

celest thorn
#

wdym?

#

foreach (Item item2 in player.Items.ToArray())

upper pike
#

Oh

celest thorn
#

because i update items i do it like that

#

and no

upper pike
#

I really don't like item2 as a variable name

celest thorn
#

even if i remove the toArray

#

it happens

restive turret
#

Create a reproduction steps and I check it when I feel better

upper pike
#

Yeah I wouldn't expect it to change

#

Are you changing the enumerable in the foreach, cause otherwise you shouldn't need that toArray

upper pike
#

Alr fair enough

celest thorn
#

its not why the serial

#

is wrong

upper pike
#

Reproduction steps:
(Serial += 2 TrollDespair)

upper vapor
#

^^^^

celest thorn
#

its so random

restive turret
#

Since works on custom items and have no clue what you doing

celest thorn
#

Ok so what i do is

InventoryExtensions.OnItemAdded i do Item.Get after 0.1
And build the item which consist in

  • Removing the original on the item
  • Adding custom keycard
  • Their ID

to Recreate it in game i just
Give myself the Item
and then log the 2 id

#

It seems to change id when it enters the inventory, when its not in the inventory it works fine so OnDropping works fine

restive turret
#

Guh ofc when you add a new custom keycard and its id it will be different

celest thorn
#

It never happened before this update

#

and i can tell you it works when i drop it

restive turret
#

Set the serial after you created to the original one

celest thorn
celest thorn
restive turret
#

I ain't seen that

#

That's not

celest thorn
#

so what you mean

restive turret
#

Literally

#

created.Serial = oldItem.Serial

#

(idk if serial is settable

upper pike
#

Don't think so

#

Not through the property at least

celest thorn
upper pike
#

You can with the base type

#

Not the LabAPI wrapper

restive turret
#

Have you tried adding a 0.1 delay after the Give item?

celest thorn
#

Yea but how do i know which is the new keycard

upper pike
restive turret
#

Ye your code is super wierd to me ngl

#

Why you sub to onadded ?

celest thorn
#

or in any way shape possible

restive turret
#

Ye i have no clue ngl

slender lynx
#

who is intelligent

#

someone gotta know this issue

celest thorn
#

I found out the solution

#

this game created a shadow item

#

an exact replica

#

but its just invalid

#

it doesn't bother gameplay

#

nothing

#

it just sits there

#

and then gets replaced

#

shrodingers cat but in SL

restive turret
#

??

celest thorn
#

an item exist

#

but it doesn't exist

#

its a super item

#

quantum physics with items

upper vapor
#

Schrödinger's keycard

upper pike
#

Schrödinger's item

upper vapor
#

Zero can you show your full code

celest thorn
#

So i can’t for a while

#

Because people hog in the goods places with a socket

#

But yea now that i created qbits on sl im gonna make a quantum computer

#

Ngl

#

Btw i hate assembly i forgot that i don’t have a continue and crashed the emulator so many times

#

Because i was making it go back to the loop without incrementing

#

Kinda my skill issue

upper vapor
upper vapor
frosty bobcat
#

what is the best plugin for syncing discord roles into scpsl, as well as bots with playerstats

#

i've used scpdiscord but it felt really unstable and kept breaking with a lot of bugs

icy knoll
#

cedmod can do that too, but some people consider that to be unstable too.

if you know how to code then #1394397577004318850 exists and you can make your own module for it (I haven't had the time to make a module yet for that kinda thing)

waxen kayak
#

hmm

#

how to pathing from a to b

upper vapor
#

navmesh is funny in HCZ but it should work fairly well in other hones

static meteor
# waxen kayak how to pathing from a to b

I do

        private void CalculatePath()
        {
            if (_currentTargetRoom == null)
                return;

            Room currentRoom = player.CachedRoom;
            if (currentRoom == null || player.Team == Team.Dead)
            {
                LogManager.Warn("Cannot calculate path: Current room is null, Sending bot to spawn location");
                return;
            }

            ClearPathVisualization();

            _roomPath.Clear();
            List<Room> foundPath = Room.FindPath(currentRoom, _currentTargetRoom, CalculateRoomWeight);
            if (foundPath != null)
                _roomPath.AddRange(foundPath);

            BuildWaypointPath(currentRoom);

            if (_enablePathVisualization)
                CreatePathVisualization();
        }
waxen kayak
static meteor
#

My own pathing system

waxen kayak
#

wow

#

so now

#

i can build path between room a and b

#

but I cant pathing in room

static meteor
# static meteor My own pathing system
        private void BuildWaypointPath(Room currentRoom)
        {
            _waypoints.Clear();
            _currentWaypointIndex = 0;

            if (HandleClassDInitialDoor(currentRoom))
                return;

            if (_roomPath.Count == 0)
            {
                Room randomRoom = RoomExtensions.GetRandomRoomByBlacklist();
                SetDestination(randomRoom);
                LogManager.Debug($"No path found from {currentRoom.Name} to {_currentTargetRoom.Name}, Selecting random room {randomRoom.Name} - {randomRoom.GameObject.name}");
                return;
            }

            for (int i = 0; i < _roomPath.Count; i++)
            {
                Room room = _roomPath[i];
                ProcessRoomWaypoints(room, i);
            }
        }
upper vapor
waxen kayak
#

and my bot always hit the wall

static meteor
static meteor
#

Dosent work in heavy

waxen kayak
#

shit I forget it

#

nw moment

upper vapor
#

we don't wanna make performance even worse by making meshes readable

unique crane
upper vapor
#

though you could argue that some geometry is just

unique crane
#

Game was never meant to have navmeshes

waxen kayak
#

hmm

static meteor
# static meteor In most rooms to uses the center in some like testroom it uses specific waypoint...
        private static readonly Dictionary<string, List<Vector3>> RoomSpecificWaypoints = new()
        {
            ["HCZ_Straight_PipeRoom(Clone)"] =
            [
                new Vector3(-1.89f, 1f, -5.54f),
                new Vector3(2.96f, 1f, -6.19f)
            ],
            ["LCZ_ChkpB(Clone)"] =
            [
                new Vector3(5.34f, 1f, 0.12f),
                new Vector3(14.84f, 1f, 0.12f)
            ],
            ["LCZ_ChkpA(Clone)"] =
            [
                new Vector3(5.34f, 1f, 0.12f),
                new Vector3(14.84f, 1f, 0.12f)
            ],
            ["HCZ_Testroom(Clone)"] =
            [
                new Vector3(6.53f, 1f, 5.48f),
                new Vector3(0f, 1f, 5.93f),
                new Vector3(-6.53f, 1f, 5.48f)
            ],
            ["HCZ_127(Clone)"] =
            [
                new Vector3(-5f, 1f, 0f)
            ],
            ["HCZ_Crossroom_Water(Clone)"] =
            [
                new Vector3(2.26f, 1f, 2.48f)
            ],
            ["HCZ_Nuke(Clone)"] =
            [
                new Vector3(-3.14f, 1f, -0.12f)
            ],
            ["HCZ_TArmory(Clone)"] =
            [
                new Vector3(-2.58f, 1f, 0f)
            ],
            ["HCZ_939(Clone)"] =
            [
                new Vector3(2.04f, 1f, -0.45f)
            ],
            ["LCZ_330(Clone)"] =
            [
                new Vector3(-4.50f, 1f, 0f)
            ],
            ["LCZ_173(Clone)"] =
            [
                new Vector3(-4.28f, 1f, 0f)
            ],
        };
        private List<Vector3> GetRoomSpecificWaypoints(Room room, bool useRandomWaypoint = false)
        {
            List<Vector3> waypoints = [];

            if (RoomSpecificWaypoints.TryGetValue(room.GameObject.name, out List<Vector3> localWaypoints))
            {
                if (useRandomWaypoint && localWaypoints.Count > 0)
                {
                    Vector3 randomLocal = localWaypoints[Random.Range(0, localWaypoints.Count)];
                    waypoints.Add(room.WorldPosition(randomLocal));
                }
                else
                {
                    foreach (Vector3 localPos in localWaypoints)
                        waypoints.Add(room.WorldPosition(localPos));
                }
            }

            return waypoints;
        }
waxen kayak
#

so the main problem is how could I nav in hcz(

upper vapor
#

my advice as always
make the meshes out of simple shapes yourself

unique crane
#

Or ignore the clutters

#

I'd say that's good enough

#

Make them walk in middle

#

Or define your own waypoints

waxen kayak
waxen kayak
waxen kayak
upper vapor
waxen kayak
#

I dont know how does lh work but it has lag in idle mode(

upper vapor
#

just

#

disable idle mode

#

the server runs at a low frame rate so that's partially why this happens

static meteor
#

Idle mode isn't needed on a testing server

upper vapor
#

unless

#

you forget to shut it down

waxen kayak
upper vapor
#

:q

unique crane
#

😐

#

Ctrl c

#

Xd

upper vapor
#

alt+f4
-# on ptero

waxen kayak
#

Press alt+f4 to command the players --Ntf private

#

Press T to kill all scps --Ntf private

waxen kayak
static meteor
#

Either local admin configvor gameplay config

upper vapor
waxen kayak
#

or im blindness

upper vapor
waxen kayak
#

looks I need to have a meet with doctor

waxen kayak
static meteor
#

They're local positions in the room

#
        /// <summary>
        /// Returns the local space position, based on a world space position.
        /// </summary>
        /// <param name="room">The room instance this method extends.</param>
        /// <param name="position">World position.</param>
        /// <returns>Local position, based on the room.</returns>
        public static Vector3 LocalPosition(this Room room, Vector3 position) => room.Transform.InverseTransformPoint(position);

        /// <summary>
        /// Returns the World position, based on a local space position.
        /// </summary>
        /// <param name="room">The room instance this method extends.</param>
        /// <param name="offset">Local position.</param>
        /// <returns>World position, based on the room.</returns>
        public static Vector3 WorldPosition(this Room room, Vector3 offset) => room.Transform.TransformPoint(offset);