Turret auto authorization (Rust)
Looking for plugin which would do automated seld authorization for fresh placed turrets and fill them up with ammo. I would like to be bale to set amount of ammo in config file. And of course auto turn turret on.
In response to miesku ():
Looking for plugin which would do automated seld authorization for fresh placed turrets and fill the...
I'm sure there is a paid plugin for that, Search for Dynamic Cup Share
You only get authorized using this plugin but need manually load ammo and turn turret on.
In response to miesku ():
You only get authorized using this plugin but need manually load ammo and turn turret on.
that's correct.
I wrote a plugin that does this.  It's not ready to put online yet.  But here is some code from it. 

bool started = false;

void OnServerInitialized()
{
	started = true;
}

private void OnEntitySpawned(BaseNetworkable entity)
{
	if (started && entity is AutoTurret)
	{
		AutoTurret turret = entity as AutoTurret;
		//turret.bulletSpeed = 200f;
		//turret.sightRange = 30f;
		//turret.aimCone = 1f;
				
		StorageContainer sc = entity as StorageContainer;
		ItemContainer ic = sc.inventory;
		Item primer = ItemManager.CreateByItemID(turret.ammoType.itemid, 69);
		if (primer != null)
			primer.MoveToContainer(ic, 0, true);
		
		NextFrame(() =>
		{
			turret.authorizedPlayers.Add(new ProtoBuf.PlayerNameID
			{
				userid = turret.OwnerID,
				username = "SmartDeploy",
				ShouldPool = true
			});
			
			//turret.SetPeacekeepermode(true);
			turret.SetOnline();
		});
	}
}​
Thanks. I will look to i / test when get to my pc. Will send you some feedback.