#plugins-dev-chat
1 messages · Page 18 of 1
If you wanna avoid manually copying the DLL, you can create a target in your csproj
<Target Name="CopyDll" AfterTargets="AfterBuild">
<Copy SourceFiles="$(OutDir)$(AssemblyName).dll" DestinationFolder="plugins/dir/here"/>
</Target>
Make sure to put this at top-level, outside of a property or item group
Hello so I found out how to get player location but Round start is not working
[2025-05-05 21:34:37.033 +02:00] [ERROR] [LabApi] 'NullReferenceException' occured while invoking 'Round_start' on 'plugin.HelloWorldPlugin': 'Object reference not set to an instance of an object', stack trace:
at plugin.HelloWorldPlugin.Round_start () [0x00006] in <64cf384ed375447fbc95899719ad32be>:0
at LabApi.Events.EventManager.InvokeEvent (LabApi.Events.LabEventHandler eventHandler) [0x0001d] in <d2a3c666310742d89f4500799b727b29>:0
Could you post your round start code?
Surround it with
```csharp
code
```
For easier reading here if you copy it
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LabApi.Features;
using LabApi.Loader.Features.Plugins;
using LabApi;
using LabApi.Features.Console;
using LabApi.Events.Arguments.ServerEvents;
using LabApi.Events.Handlers;
using Unity;
using UnityEngine;
using LabApi.Features.Wrappers;
namespace plugin
{
internal class HelloWorldPlugin : Plugin
{
"
plugin setup
"
public override void Enable()
{
ServerEvents.RoundStarted += Round_start;
}
public override void Disable()
{
ServerEvents.RoundStarted -= Round_start;
}
"
c# code
"
private void Round_start()
{
"
c# code
"
}
}
}
what's the code in Round_start
Gets Player Position and prints it
Your error is at line Gets Player Position and prints it
Jokes aside if you don't show the code we can't help much
Error is in roundstarted
Oh
Vector3 Position = player.Position; this is the code
it doesn't print anything yet
Again, if you don't show code we can't help
All we could say is player is probably null
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LabApi.Features;
using LabApi.Loader.Features.Plugins;
using LabApi;
using LabApi.Features.Console;
using LabApi.Events.Arguments.ServerEvents;
using LabApi.Events.Handlers;
using Unity;
using UnityEngine;
using LabApi.Features.Wrappers;
namespace plugin
{
internal class HelloWorldPlugin : Plugin
{
public override string Name { get; } = "Hello World";
public override string Description { get; } = "Simple example plugin that demonstrates showing a broadcast to players when they join. Using 'Legacy' (C#) events.";
public override string Author { get; } = "Northwood";
public override Version Version { get; } = new Version(1, 0, 0, 0);
public static Player player { get; }
public override Version RequiredApiVersion { get; } = new Version(LabApiProperties.CompiledVersion);
public override void Enable()
{
ServerEvents.RoundStarted += Round_start;
}
public override void Disable()
{
ServerEvents.RoundStarted -= Round_start;
}
private void Round_start()
{
Vector3 Position = player.Position;
How can i set it?
You can't do public static Player player { get; }
You'll have to do a foreach loop of Player.List
set it to { get; set; }
Yeah I just realised
and then do player = Player.List.FirstOrDefault()
assuming youre doing like
testing
Wait but the host
if you want to get the player you either need an event that has a Player or get a specific player
learn C# first
LabAPI doesn't set Modded flag automatically?
Installing a plugin should enable it
i use only private plugins
The server should automatically enable the modded tag if any plugin is loaded
it should, but it doesn't
yup, it did
Oof
Yup
#plugins-dev-chat message
@marble cobalt @harsh thorn
now my vanilla server with transparently modded config options set to true is a modded server
and server with heavy gameplay changes is a vanilla lmao
atleast one of the officials is now modded as well (when new round happens) 😄
well, "modded"
ill uh fix that now
now i know how many players really pay attention at the "modded" flag ||no one||
or why did they stop being customizable
so now delist all servers that are spoofing modded flag :tf:
Is there an event called when 079 pings something?
it is still same
error
Because problem is in Round_start and I don't know how to fix it
no, there is not
you need a patch
Problem is that Rounstart() returns null because of void but when i delete it it requires a return type
made a suggestion issue on github
In PlayerEvents.Death, are the player's effects still active?
Can someone tell my why UserGroup's toString was changed?
like, previously in 14.0 it was Name but in 14.1 it is "UserGroup"
wha
huh?
yes?
Left: 14.0
Right: 14.1
Decompiled as in basegame decompiled
Which is required to read basegame code without asking for source code
Sorry, just assuming 3 layers of knowers: Plugin Devs (nosauce), LabAPI (labapi sauce) and SCPSL devs ( full sauce)
And UserGroup is basegame sauce
so they have git history for why ToString was changed
(or rather absent)
One of my mods were part of the Windows 7 network group for few weeks instead of Moderator 
That is strange, in 14.0 it went to the BadgeText
using System;
[Serializable]
public class UserGroup
{
public UserGroup Clone()
{
return new UserGroup
{
BadgeColor = this.BadgeColor,
BadgeText = this.BadgeText,
Permissions = this.Permissions,
Cover = this.Cover,
HiddenByDefault = this.HiddenByDefault,
Shared = this.Shared,
KickPower = this.KickPower,
RequiredKickPower = this.RequiredKickPower
};
}
public string BadgeColor;
public string BadgeText;
public ulong Permissions;
public bool Cover;
public bool HiddenByDefault;
public bool Shared;
public byte KickPower;
public byte RequiredKickPower;
}
That is the same for 14.1
yep
huh...
i cant check 14.1 decompile only labapi beta
// Decompiled with JetBrains decompiler
// Type: UserGroup
// Assembly: Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 156569EC-C726-4212-AB3F-E7F73EAB7F55
// Assembly location: /mnt/ssd-storage/Dev/MemeSCP/MemePlugin/libs/Assembly-CSharp.dll
using System;
#nullable disable
[Serializable]
public class UserGroup
{
public string Name;
public string BadgeColor;
public string BadgeText;
public ulong Permissions;
public bool Cover;
public bool HiddenByDefault;
public bool Shared;
public byte KickPower;
public byte RequiredKickPower;
public UserGroup Clone()
{
return new UserGroup()
{
Name = this.Name,
BadgeColor = this.BadgeColor,
BadgeText = this.BadgeText,
Permissions = this.Permissions,
Cover = this.Cover,
HiddenByDefault = this.HiddenByDefault,
Shared = this.Shared,
KickPower = this.KickPower,
RequiredKickPower = this.RequiredKickPower
};
}
}
ced also a programmer so yea 
miller can i bonk you
no
Awh
woo

is this gentle

bump 
Doubtful
Yes that's good, thank you 
But you can try it and see
PlayerEvents.Death? You mean OnPlayerDeath?
(yes, they quoted the C# event itself and I did the override name in CustomEventHandler)
I'll try it
I use the static version in my case
Based on source, they should be dead by the time that is called
kinda figured, unfortunate
Try OnDying
yeah that's what i'm using atm
just not ideal since another handler can say "nah"
i'll probably just save some state between Dying/Death to bridge the gap
Wouldn't lower lib prio would solve that?
Thinking from a LIB perspespctive that forcefully applying event to a Dying + Death would cause unforseen consequences like "why did this run while I prevented it"
Aaah
I don't control the order of each event handler being added/removed either since they're only added when necessary
attempting to would probably lead to some disgusting code anyway
That's the funny things!
Its a lottery
Does the OnServerProjectileExploded get called when a projectile explodes or also when the fuze starts?
nvm only when it explodes, agh
is there any event I can get for when a timed grenade starts ticking? outside of being thrown by players
i.e. explosion starting another grenade's timer
yeah neither of them fire an event when they start ticking
i'll just handle it with OnServerProjectileExploded then
Trying to avoid patches as much as I can
The event should be fine
player.Camera doesnt have a NetworkIdentity, so its not pareted client side
sadge
Wait why isnt it a net identity
net id is usually only on the root object
if you do come up with a solution write it in here https://github.com/northwood-studios/LabAPI/issues/27
i have heard of using a string path todo it, although not sure how to generate them
you can apparently do transform.Find(string path) which is one half of the problem (client side). just need to find a good way to format the method
and to find the path to the non NetIdentity object relative to its ultimate NetIdentity parent
transform.Find does not perform recursive search actually
so nevermind.
I think I'm actually double wrong but
my excuse is its 11:30
its interesting
Not like making it recursive would be hard
But yeah using the path would probably work fine
Can use the root's NetworkId and pair it with a string path so it works on clients
I found a simple script online to derive a path name from a gameobject
the
way (almost)
so if you parent something without a Net ID the game will search up the heirarchy until it hits a net ID or doesnt.
public static string GetPathToNetIdParent(this Transform transform)
{
var stack = new Stack<string>();
while (!transform.TryGetComponent(out NetworkIdentity _))
{
stack.Push(transform.name); // maybe GameObject.name?
transform = transform.parent;
if (transform == null)
throw new InvalidOperationException("Object is not part of a networkable object");
}
return string.Join("/", stack);
}
public static Transform FindChildRecursively(this Transform transform, string path)
{
var names = path.Split('/'); // urge to use spans ughhh
foreach (var name in names)
{
transform = transform.Find(name);
if (transform == null)
throw new InvalidOperationException("Couldn't find child transform");
}
return transform;
}
haven't tested but it might work
Unreal generates its equivalent of a network id the first time it sends the path to a client
So it sends "hey, so the object at path X.Y.Z, I'm assigning it network id XXX for you"
amazing
client goes "okay, I will now refer to X.Y.Z as network id XXX"
and now then can reference it over the network for cheaper
dynamic net guids like these are per player, not one guid for everyone
what happens if there's a conflict
does UE disallow naming your objects the same way as other siblings?
same as Unity you can't

paths are unique, can't have two objects with the same path
so World.SomeObject can't have World.SomeObject
World.SomeObject and OtherWorld.SomeObject can coexist though, different paths
that's nice
but yeah NW can probably implement that, hell they can look at UE's source code if they want
all open
unreal's net guids are 8 bytes so once clients ack the dynamic guids they'll just be cheap to reference over the net
There's different types of net objects in Unreal:
-
Name Stable For Networking: the name is always the same on server and client. This is generally for objects loaded in the map, but you can manually mark an object as stable for networking if you MAKE SURE to name them the same on server and client and you know what you're doing. Even non-networked objects loaded from the map are considered stable for networking and can be referenced over the net. Default components of an actor (think child gameobjects in a gameobjects) that are constructed during class construction are considered stable for networking too (they're not created at runtime but rather exist in the "prefab" equivalent of Unreal).
-
Dynamic/unstable: the name isn't guaranteed to be the same on server and client. Can't refer to it over the net by name. If the object is networked & created on the server, it will get a netguid assigned to it per player and each player will receive that guid alongside the object. If an object only exists on client or server, it cannot be referenced at all. If it isn't networked, it cannot be referenced (not networked = none of its parents up the chain are networked, otherwise you can reference it somewhat)
UPackageMapClient handles mapping net guids to objects. Each connected client has one created for them so you can easily map references both ways.
In SL's scenario for the discussion above, it'd be considered stable I'd say. Since it's part of the player prefab. Would get a net guid assigned once networked from server to client.

what happens when the player is killed and respawns and now has a new prefab?
new netguid because new actor
anyways if someone could put this in the github discuss, im not comfortable putting it there myself.
my pleasure
Where is Logger.Info printed ?
The dedicated server terminal
did so
Well rather than following unreal try follow mirrors thing
Does Mirror have a way to reference children
Because otherwise Unreal's way of doing it is a good fit for that here
and Mirror already does part of the job with the NetworkIdentity component
i think mirror is kinda light in comparison, it doesnt really support parenting directly it had to be coded to allow it
Looking at Mirror's API I feel like you could create a NetworkChildManager component to handle the logic I described
Mirror's cool, if it existed back in the days I might've stayed on Unity heh
Eh
Isn't really performant
And the trillion waving, dirty writing individually isn't great
wonder if it could use source generators
to automate some of that
probably could honestly, with source gens you could probs reproduce Unreal's networking API 1:1 and it is quite sweet
just dunno why Unity's always been having issues getting a good, stable official networking API :/
ah i see
Because unity
Their networking solution is experiment for over years at this point
Many 3rd party exist bc of it
Fishnet, mirror, and the SaaS solutions (playfab, photon)
not garunteed to be, depends on what authentication provider they used, can be discord/steam/northwood and maybe pateron?
the id should be postfixed with the provider e.g. 123122343123@steam or 43824342390@discord safhkajdf@northwood
noted ty
Is there ItemType for Scp127?
Wdym patreon, there is no emus for it
Yes
Gun127 or GunScp127
It's the last or around that
none
make sure to update your references
R u sure you are on 14.1
I am not sure
:sob
use the labapi-beta or early-server-build branch on steam
what
it just doesn't seem to work no matter what i do
do light.transform.localPosition = Vector3.zero instead of light.NetworkPosition which doesnt do anything
if your using the LabAPI i recommend using the wrappers instead
i tried that and it didn't do anything
it works for me
just use the labapi wrapper
something else is going on, should be no difference between static/non static
actually its because of the delay probably
why is there a delay actually
this should work, even with a delay or isStatic: false
var light = Toys.SpawnLightSource(Vector3.zero, Color.White, 100f, 100f, isStatic: true);
light.transform.SetParent(player.GameObject.transform, false);
hmm, is this how it would look like with LabAPI wrappers?
you should be able to set the parent in the Create command
you can just make .Create(player.GameObject.transform)
oh yeah uh
for position
thats now local
not world position
what eve said should really work, atleast from my testing is spawns it right at the player
#plugins-dev-chat message should be exactly like this, if the light is disappearing into the void then thats a bug
this is the code, light just doesn't exist
even tried to set position once again to 0,0,0
nothing changed
strange, ill try testing it again later
what if you set toy.IsStatic = true; after the first line?
I thought the same, this doesn't work either
just to make sure, you dont have any other code that manipulates the light like setting its position
no, there is only code i've shown and for unspawning it for player's that joined during round
not sure then
how do you respawn the light?
i don't, after player died i destory the object
nvm my question is irrelevant
i will also check one plugin that might do something to primitives
oops
ahh
i guess killer never updated it for client side parenting
looks like you need to unpatch the patch
average killer moment
i will disable the patch and see what happens
open an issue on mapforge's github
smh
-# real
yep, now it works
yipee
very nice
nuh uh
just one hour of my life wasted, could've been worse
Average programming experience
Idk if killers will continue to develop MapForge because of ProjectMER
but i made an issue
Why are you destroying the light after its made?
i'm destroying it for everyone expect player that is a parent of it
this player is invisible to others that's why
Ah
having a floating light that's visible to all players is not ideal
invisible with the hat effect or by fake scaling the player?
Fake destroying message
I have a patch on FpcServerPositionDistributor.WriteAll
It's still unchanged from NWAPI
I see there's an event for that
you shouldnt need to destroy the light if your patching FpcServerPositionDistributor.WriteAll to hide the player as that should be similar to using the hat effect.
if i understand it correctly the server sends players to the void when they are considered invisible to the observer
and yes that visibility event should do the same thing
yea it worked that way, but these "ghosts" can become visible for a short while to other players and in that scenario the light would also become visible which i want to avoid
so i guess it's easier to just destroy the light
ahhh, yeah your solution would be the way to go
the lights would also be visible to other "ghosts" and i know some players have bad pcs
so yea
Alright thanks
should rely
still relying
I got home, updated my references and it is still not working... 
And are you updating them at the correct place?
You might be referencing completely different ones...
I tried labapi from git and from the dedicated server, I have no option to do ItemType for scp127
ItemType isnt from the LabAPI dll its from the AssemblyCSharp.dll
oh my bad
i would check what assemblyCSharp you are referencing, make sure its the one for 14.1
hi riptide
hi
2 times now
hey
is there a way to know what key has player assigned to Keybind setting in SS settings?
No, there is not
You can use the SSKeybindHintParameter to replace it client-side
For hints
nooo 
i want to use that for hints but now i need to touch my Menu system
or maybe not, i made like a milion overloads
aaaaa
there is not overload for SendHint that accepts both hinteffects and hintparameters 
Merged in but not in release version (yet)
can't wait to delete these extensions
1 minute of silence for those extension methods

first one already exists in labapi?
Not without creating if it doesn't exist afaik
oh there isnt one for effects and params
but there is seperate ones
yup
why is StringHintParameter needed?
hello dev people
maybe you know @unique crane ? (sorry for the ping)
It isnt
i had to make some changes to menu system but now i can do that
hello event winner, site host, beta access ghostz
Is there a way to spawn specific candy pickup?
CandyKindID kind = CandyKindID.Red;
Scp330Pickup pickup = Scp330Pickup.Get(Pickup.Create(ItemType.SCP330, yourPosition));
pickup.ExposedCandy = kind;
pickup.Candies.Add(kind);
This should do the trick
Thank you
u r so smart

now make a player.AddCandy method
unless you did already
Y’all think I should bring an exiled plugin over to this? It’s a global stat tracker
Make one yourself 
You’re never gonna believe what ima tell you
I did
No way
you should just make it for LabAPI and have the exiled version use the exiled plugin class
less work 
I already made it for exiled tho :/
So it would be making it for labapi
Unable to PR a fix atm but if any NW dev sees this, Player.ClearItems() has erroneous logic, you're removing items while iterating forward
public void ClearItems()
{
foreach (Item obj in this.Items)
this.RemoveItem(obj);
}
doesn't work
hahahaha
already fixed
^
you just need to wait for a new release
DropAllItems() has the same issue
is that fixed? don't see it on the repo
nvm found it
Is there an event for cancelling inspects in labapi? i can’t find anything for it
like when the i key is clicked on an item
or is that client side?
doesn't seem to be the case
would be cool to have
working on something that needs a lot of keybinds that i'll map to custom actions
shame we can't make custom things like that
I think I wanted to do that for firearms but I didnt do it for some reason
but I dont remember why
would be great if you could try work on it again or smth
or maybe just smth specifically for chaos radio stuff
any chance in the future to like, allow a few custom keybinds on the server that clients can change
which would fire events on the server when pressed?
SSKeybind?
Server Specific Settings has custom keybinds fields
Already exists
oh shit really?
got any docs/link to a source file I can look at on how to set these up?
that would be awesome
ty, looks sweet
COMPLETELY unbiased but https://discord.com/channels/330432627649544202/1339704289291141130 has a cool wrapper for it
will check ty
Cant wait for have a SSWrapper dll
nuh uh
Im gonna kill u
Why not
Eve wants to kill everyone
:(
Actually curious on peoples thoughts on this. How would you feel if somebody copied your server's internal plugins? Like not literally copied and pasted the code/dlls but made a feature recreation essentially 1:1? Would you care? Would you feel upset? Would you think it was wrong? Would you think it's their right?
if they are capable of making a nearly 1:1 creation by themselves, then that itself is pretty impressive
crediting the idea imo only really matters if its unique in nature
if its a 1:1 perfect replica or damn near it, then thats sus
but if its just abstract the same way, then idc
Can't copyright mechanics, if you reverse engineer code without looking at it at all, it's fair game
they'd be allowed to be upset but like, it is what it is
Back when I had less projects I wanted to copy Chaos Theory as one plugin using the wiki and my friends who play CT for reference but I thought it would be kind of disrespectful since I dont know tttt and I didn't ask her for permission. But I did think i would have had the right to if I wanted.
Many server copies it, creating new stuff based on those is hard than just literally copy mechanic
Does LabAPI have a way to spawn a dummy that doesn't show up in the player list?
its annoying to do but it is possible
check cedmod
it has working code iirc
checking it out
Oh 0.7.0 soon
I see, cool
Im not a fan when ppl do it. But you cant stop ppl from doing it. Ppl dont get very far making unoriginal stuff tho
Its not very stimulating
Using the wiki tho to make a copy tho is a bruh moment lol
I use the wiki to learn what NOT to do as respect whoever came up with the idea and implementation
If we talking about the ct wiki its just funny the idea of ppl using the resources we put out there to help navigate the server to copy stuff.
Oh yeah that's fair
I wouldn't've used or published it if I did make such a thing if that makes it better.
I thought of it like an exercise. But copying another plugin is kinda boring? Especially a creatively inclined one like CT.
Ya theres a lot of untapped ideas out there
Making a ripoff server generally doesnt last long anyway
Peeps will prefer the original having played on it longer
Server died and isn't coming back? Sure. Active server? Bleh
- Added new Drawable Lines on both the client and server.
pog, easier raycast, linecast debugging
Huh what
serverhost annoucement
yeah 

this gon be fire
not just for raycasts....
Any event to override the danger level from 1853?
i.e. I want dummies not to trigger that
I have a custom status effect that implements IMovementSpeedModifier but instead of making the player move slowly it just rubberbands them the correct amount so their overall displacement is the same as if they moved slower.
Is it just a desync issue or am I doing something wrong?
the values in question.
dw, was joking
idk any youtube videos but if you wanna learn C# for SL plugins i recommend thinking up a plugin you want and work on that
rather than following a YT tutorial on how to make a calculator
like, if you flip it and it lands on heads it has a 25% chance to blow you up or something?
Yea have you played chaos theory before?
nah, but making a plugin like that should be quite shirmple
if you take a look at the labapi wiki it'll show you how to create a very basic plugin - https://github.com/northwood-studios/LabAPI/wiki
you can combine the example logging plugin with a bit of googling on "c# 25% chance math example" or something and do a bit of messing about
Yes I got inspired about that, but I would love to make it “do event stuff” as well, maybe turn ON FF for 10 seconds, fake nuke (I’ll download the sound from your wiki https://en.scpslgame.com/index.php?title=File:Main100.mp3 and do everything that the warhead will do, but it’ll be ofc fake)
hell yeah those sound like good starter projects
on here it explains how to do timings :)
I’ll just have to wait till 14.1 comes out fully (dedicated servers doesn’t update)
i recommend getting in touch with tech support if you're having issues with updating your server :P
Nah it’ll just need to be waited
But yea I’m making a server (it’s a funny)
Think chaos theory, on steroids
Hell I’m thinking on making 173-B, on breakneck speed it’ll squish players making them slow
There are 14.1 server tools available
My ideas on what to make
•Gamble coin
•173-B
•A-train jailbird;
Can’t slow down, speed up to 255 slowly, on contact it’ll explode

speed is client side as well
use slowness effect instead since its client side too
any other modification will cause desync
Sucks that we have to use multiple effects
Maybe NW can get that implemented or something
didnt make it in this update, will have to be the one after
Ay ay
I believe that jailbird overrides speed boost
So you move at the same speed no matter the status effect
doesn't seem to be any so I'll just patch out EncounterDangerBase.RegisterEncounter to ignore dummies
you cant create a custom effect that affects movement speed
already suggested this
but like
its kinda difficult

yeah, would still be a nice addition
theyd have to rework how effects are synced
they can always network additional data for modded effects
makes em more heavy but it'd work
still shows up in the player list, using some of their code
weird
ced might know more on it 
@harsh thorn poke, trying to make a fake player that doesn't show up on the player list but is still able to do player stuff (exist, talk etc)
any ideas? would be much appreciated ^^'
tried ClientInstanceMode.Host and ClientInstanceMode.DedicatedServer to no effect
the latter just hides the player in RA but not in the player list
hell, even Unverified has them appear in the player list wtf
set userid to empty string
are you allowed to have multiple players with the same userid
either way - doesn't work
it still shows up in the player list
maybe to null then
null did it
ty
where would one override round victory behaviour (through event or patch) to ignore certain players when checking if the round should end
exiled has Round.IgnoredPlayers but i think its a patch
well it shouldnt be an event
it should be a List<Player> property
either that or an event fired to check if a player should be counted for round summary purposes
transpiler is needed i think
well ig you could prefix the entire thing
idk
i dont remember
i know what prefix postfix is
another patch for ReferenceHub.GetTeam() to return spectator for select players if that bool is true
i know you know
just slow at typing my logic

dont do that
could cause other issues
yeah ik it's bad
i'll go the transpiler route
and by that i mean
i'll throw it at another dev on the project that's good at that
Eve is good at that
negative
How does one make a damage handler disintegrate bodies like the disruptor
Tried to implement the interface its damage handler does and it still doesn't work
you need to use the disruptor damage handler
not a custom one
Shucks, can we derive from it and override the damage at least
Or will that also break
i wouldnt know
Reflection!!
Reflect deez 
Is the dryfiring event fixed in the 0.7.0 version of Labapi?
Whats wrong with it?
Does not fire
NO
I went through all weapons, including SCP-127. None call it
say it
im proud
thank you everybody.
david
Aha
can you give me 50 dollars
You know what the issue is
thanks
what did u do
Nothin
It fires only once, which makes sense
It cannot dry-fire if it aint cocked
ah so i need to cock my weapon per code first?
After that its just clicking?
which i guess doesnt have qn event.
Unfortunely no
That would probably cause animation oddities but I think so.
So non-revolver weapons would need to be cocked per code to then use the Dryfire event?
Alright
Nah
It would work fine
Its synced
Com 18 cocking on its own would look a tiny bit weird
i didnt say theres a desync just that it may look weird sometimes.
But the barrel will go forward
the slide?
slide*
Okay yeah probably
Ill record it one sec
can we have event for it?
WeaponClicking
WeaponNotFiringAndNotDryFiriring
Inserting magazine and reequipping should trigger the animation
i wonder if i can empty a chamber and mag from code?
Absolutely
scp sl having more indepth gun mechanics than call of duty
Hubert made them very much simulated
simulated?
Can I just set the mag and chamber to zero
(just a number of cocked)
and the client wont desync
Yeah thats done automatically
You can actually change the amount of chambers
and it works just fine lol
Up to 16
Even synced
wait
In the inventory
I can change the number of chambers
Yep
Uhh every that uses AutomaticActionModule or PumpActionModule
havent tested with revolver
and surely not for disruptor
Gonna change the shotgun to have 3 barrels to have a TF2 equivalent Loch n' Load :p
You can change it to 16 even in current version
automatic action module?
Firearm is now the base class and it uses "modules" to define functionalities
Eg
Automatic Action Module, Pump Action Module, Magazine Module
Yeah
Its the most used one
crossvec
Yep
etc
Oh okay
so it means full auto
Makes sense
what happens if i give it more than one chamber?
Only Revolver, Shotgun, Disruptor uses different ones
pistols ?
Then it fills the amount of chambers you set it to next time it cycles
So it depletes the amount of chambers from the mag?
Yep
does the gun handle any differently, like does it shoot more bullets or does it run out faster or is it just a glorified magazine extension
Then it just iterates over each barrel and does the shoot logic
Could i switch out the Pump Module for a Full auto module on a shotgun? :o
You can set the amount of chambers to 16
Or whatever you want
below that
Shotgun doesnt cycle unless all barrels are empty
Wait so does that mean 16 shots before pumping and 8 shots with double shot?
Yep
Also turns out you can just hold the trigger for shotgun lol
(didnt know that)
So does this mean it shoots 16 times
at once...
okay
https://github.com/SlejmUr/CustomItemsAPI/blob/master/CustomItemsAPI.TestItems/SubModules.txt
there you go weapon submodules
nuh uh
on this topic, is there any way to bring back the semi-auto nature of pistols and revolvers per code?
The full-auto revolver feels weird :x
Well you just dont hold the mouse button?
you can uncock the revolver after each shooting
The rifles and smgs and pistols dont exactly have an animation for shooting without cycling but i assume thats what happens
Yeah for rifles it shoots all 16 at once
and other
Like com45
Com45 is just com15 but 3 barrels and more firerate
When i cock the revolver, then shoot a single shot (Sniper build), sometimes i accidentally hold down my mouse just barely long enough for a second shot to happen as well ,_,
Never happened to me
make anti mousehold macro
ez
make game go boom
i know you can swap modules I did it but idk if actually works as supposed to
then I had luck with micro that it worked
What did you do
what happens if i set a chamber and mag to empty, the player uncocks it by firing and i reset the chamber and mag to loaded?
-# im still new to LabAPI, only used Exiled so far and cant find this there either
How do i cock a gun per code?
made a new that does the same except louder and much more damage
Firearm::Base::IsCocked = true or something similar
Firearm::Base::TryGetModule(out AutomaticActionModule action)
action.Cocked = true;
or
Firearm::Base::TryGetModule(out DoubleActionModule action)
action.Cocked = true;
sob
fix!!
No
💔
Linking a message in another channel gets blocked by automod, rip
Work on the latest thread in
#1274618202227216414
pls pls pls pls pls pls pls 🥺
Maybe when there will be time
There isnt that much time before 14.1 yknow
F for labapi
pleeeeaaaaaseeeeeeeeee 🥺
You can just patch the method
this week rls or next week?
isnt like need to be 1.0 of labapi to be released to the public

Oh also it might not fire even when you patch it since it checks shot request queue
and there might be client-side checks too
but idk about that
No, Im rather gonna fix the existing ones
AutomaticActionModule.UpdateServer
if (!this.Cocked)
{
// PATCH HERE
this.ServerSendRejection(AutomaticActionModule.RejectionReason.NotCocked, 0);
return;
}
remaking everything by only knowing the "requirements" (how it works based on your and others' observations) is really fun imo
if you remake someone else's plugin that's impressive, if you remake a whole game in SL that's brilliant
we should remake every game in SL (including SL
)
sure, a remake doesn't play the same way, but it can be fun for players if the game is hosted as an event from time to time instead of being constantly available (people have said that it gets boring, i agree)
How do you remake SL in SL
idk lol
-# Is there a way to disable the first-time equip animation on a weapon?
set it to cocked
or, well, load a bullet into the chamber
Yeah
sadly there is no c0ac2d9
wdym i dont see any
oh on action
yyyeeeeaaaaa
reimplement every system serverside
14.1 release with stable LabAPI?
Yes
how does the permission.yml works ?
Nwapi is completely removed in 14.1
I'd assume it's like Exileds but idk since I can't remote connect to my server rn
stable, yes, but not all bugs will be fixed by the time it releases (allegedly, #plugins-dev-chat message)
you give each group (as per RA config) the list of permissions
wildcards also work, such as .* (everything) or myplugin.*
Basically Exileds permissions setup
well I tried using ca.test and ca.earn and I havent found a solution to able to give permisiion to a group
tried doing kind of same thing as on exiled
owner:
inherited_groups:
- moderator
permissions: []
moderator:
inherited_groups:
- default
permissions:
- ca.showhidden
- ca.earn
default:
inherited_groups: []
permissions: []
but didnt see it works so
uhh
um
inherited perms should work too
are you invoking sender.HasAnyPermission("ca.earn") for example?
weird

your server role is owner i suppose
try un-recusivifying it
-# yes i made that a word
huh
just copy the moderator perms
all i can say is
even if tis offline mode and i grant myself owner at RA console should have that permission
Need to override ApplyDamage so that I can bypass some stuff but that should be possible anyway, ty
@restive turret wrong file
edit perms at config folder not individual server
or vice versa
maybe it'll work
what file like
no there is only one
it is in server directory or at configs root?
C:\Users\matec\AppData\Roaming\SCP Secret Laboratory\LabAPI-Beta\configs\permissions.yml
The changelog does not include the auto Modded flag, but looks like it is implemented
Thank you!
it does kinda
cca47f7 Set modded flag - ced777ric
Well the full one yeah
@marble cobalt When is the next northwood studios development stream?!?!
just use secretapi :3
I didn't put up with NWAPI for 3 years to just come back to a 3rd party library again 
hey it’s probably a better solution than what anyone else has made
want my solution?
Yes please 🙏
"didnt do this for thirdparty"
Immedialtely does this

my api is lovely
(i dont use it)
i gotta make a release on it tmrw
if i dont forget
I'm sure Xname's code will be easier to maintain by myself, should he stop development. I can't imagine porting a framework just to keep my plugins working 😭
uh
look at secretapi
it has a few extensions, ssss wrapper and custom effect w basegame
Thats rly it
(also if you wanna copy paste it im not too opposed)
if its private at least
using it is simple, code behind it is a bit complicated (but i use it so i must maintain it)
hmm, you already have access to repo with it
so just take it yourself 
this is using a third party library.
This is so real
https://github.com/northwood-studios/LabAPI/issues/26 This would be awesome
Wonder if there's a way to do so through patching atm
Prob not the answer you want but you can fake someone’s appearance as a spectator to spectators to accomplish this
In the context I'm thinking of, it would break other stuff
I need to check if that's even an issue rn since they are setup as a fake dedicated server player atm
Just forgot to test it
If I do this, and the "fake player" was in the world, wouldn't it make them invisible/change their model etc
ya it would make them invisible to spectators seeing through other players eyes
yeah not ideal
just don't want them to be things you can spectate
Doesn't seem like there's any other way to hide them atm
That's unfortunate
Unless there's a mirror message to delete a component on the client?
yeah no
rip
fake role appearance it is
we get a good api when beryl is in charge
@unique crane could you show us how 079 camera constraints are handled on the client?
are they specified in angles or what? for the values i set are either too small or make the camera go wild (rotates continuously because of the constraints)
Uhhhh @worthy rune
:3
(he made camera toy so he knows better than me)
all angle constraints should be in degrees with x < y iirc
that's what i did but it just flickers
i'll see with different values
this is for the EZ camera
zooming out doesn't work
zoom can only go from 0 to 1 so if you want to lock zoom at 100% you can do x = 1 y = 1
the angles look fine to me, do you have a video of whats happening
i just tried out those constraints and they worked, are you sure the constraints you set are being applied properly
i used the NetworkConstraint properties when spawning, i'll print out what i get
my guess is somehow the x and y were switched
okay so negative vertical rotation is up, that might have been the issue
you should check out these https://github.com/northwood-studios/LabAPI/blob/master/LabApi/Features/Wrappers/AdminToys/CameraToy.cs
no worries
With what plugin you're spawning cameras in unity?
via code
Just because the Google drive files are modified in 2023
how to change name of admin toy camera (default is LczCameraToy)
they're not updated 
NetworkLabel
And how can I get latest 😅
AssetRipper
Lmao
If you want to see thing inside unity you need shitton of editing the .cs files to be shown in editor
All scripts ye
you don't even have to remove them
Half of them errored when I ripped
also i meant as from the components
cuz il2cpp
I ripped from DS
what exporter did you use
Latest version
it doesn't know how to handle non-script classes

Spent 2 hours of fixing it
Ye
you're probably better off using dnspy to export the project and putting that into unity
Ye i did end up doing that
Thanks I guess xdd
is that bug with all? (customkeycard in inventory dont show perms and name)
seems like no
btw new custom keycards methods dont work
Bruh I tested them..
Could you be more specific?
dont give to player ( i dont one who have this problem )
Will look at it soon
permissions not showing is common, but it doesnt happen always
i did report it in the qa test that it is the case but everyone shrugged it off
probably didnt see it idk
Can you show me how you do it?
No issues on my side


