Jump to content

Hello

Not a Bug 2.1.5

rustfoxgaming
rustfoxgaming

Posted

Please add an auto spawn and a server restart check to verify that your button is correctly spawned please

NooBlet

Posted

Changed Status from Pending to Not a Bug

  • Confused 1
NooBlet

Posted

There are no plans for auto spawn as the scope for plugin was never to be a event . And persistence is already in plugin so if you place it wil stay till wipe

rustfoxgaming

Posted

Here is an example of how you could add an auto spawn and a server restart check inside your plugin this is only an example to show that it is technically possible

csharp

void OnServerInitialized() { // Check if the button exists after restart CheckButton(); // Auto spawn every X minutes timer.Every(600f, () => { SpawnButton(); }); } private void CheckButton() { var button = BaseNetworkable.serverEntities .OfType<PressButton>() .FirstOrDefault(); if (button == null) { SpawnButton(); } } private void SpawnButton() { Vector3 pos = new Vector3(100f, 20f, 100f); // example position Quaternion rot = Quaternion.identity; var entity = GameManager.server.CreateEntity("assets/prefabs/deployable/button/button.prefab", pos, rot); if (entity != null) { entity.Spawn(); } }

no???

NooBlet

Posted

i know its possible , but its outside the scope of the plugin and and persistence allready in plugin , but auto spawn will not be added

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.7m
Total downloads
Customers
11.5k
Customers served
Files Sold
164k
Total sales
Payments
3.5m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.