Jump to content

Raidable Bases 3.1.3

$40.00
   (70 reviews)

1 Screenshot

  • 725.6k
  • 46.5k
  • 518.43 kB

This area is for discussion and questions. Please use the support area for reporting issues or getting help.

Recommended Comments



RR_Tappi

Posted

Okay, I'll delete the language file and check again. Thank you.

  • Like 1
laodu

Posted

6 hours ago, nivex said:

@laoduwith what arguments for this API? 

this exists already for all events, but its not specific to buyable.

        [HookMethod("GetAllEvents")]
        public List<(Vector3 pos, string mode, int level, bool allowPVP, string a, float b, float c, float loadTime, ulong ownerId, BasePlayer owner, List<BasePlayer> raiders, List<BasePlayer> intruders, HashSet<BaseEntity> entities, string baseName, DateTime spawnDateTime, DateTime despawnDateTime, float radius, int lootRemaining)> GetAllEvents(Vector3 position, float x = 0f)
        {
            return new(Raids.Select(raid => (raid.Location, raid.Options.Mode, raid.Options.Level, raid.AllowPVP, raid.ID, 0f, 0f, raid.loadTime, raid.ownerId, raid.GetOwner(), raid.GetRaiders(), raid.GetIntruders(), raid.Entities, raid.BaseName, raid.spawnDateTime, raid.despawnDateTime, raid.ProtectionRadius, raid.GetLootAmountRemaining())));
        }

 

Calling this API in other plugins is to prevent players from repeatedly purchasing raid bases. Repeated purchases in other plugins will result in failure. Without a callback API, it is impossible to determine whether the player has successfully purchased the raid stronghold.

nivex

Posted (edited)

@laodu

ok, this exists too. this is what RaidableBases uses when it blocks you from purchasing multiple raids.

add it to your plugin and call it.

private bool IsEventOwner(BasePlayer player) => Convert.ToBoolean(RaidableBases?.Call("IsEventOwner", player, true));

example

private bool CanPurchase(BasePlayer player)
{
	if (IsEventOwner(player))
	{
		player.ChatMessage("You cannot buy multiple raids.");
		return false;
	}
	return true;
}

 

Edited by nivex
  • Like 1
Kk

Posted

Hello author, every time the server restarts, there will be legacy buildings. How should I handle this situation????

QQ_1771139157931.png

nivex

Posted (edited)

@Kk

hi, I'd be looking for an error instead of thinking that the base persisted after a restart somehow. that is not possible unless another plugin is causing it. otherwise, bases are not saved in the map's save file anymore and cannot persist because they won't exist. highwalls are not saved either. this has been the case since version 2.8.6

the copypaste plugin is what handles this behavior. I've checked out the recent copypaste updates and this behavior has not changed and still works properly. raidablebases tells the copypaste plugin to not save anything that spawns. I've added output to both plugins to confirm this.

Quote

(03:13:01) | Loaded plugin Copy Paste v4.2.5 by misticos
(03:13:06) | [Copy Paste] EnableSaving is disabled? True
(03:13:06) | [RaidableBases] couldSaveOriginally is disabled? True, EnableSaving is disabled? True
(03:13:06) | You've successfully pasted the structure
(03:13:09) | [RaidableBases] raideasy1 @ X4 : 30 items

I'd be looking for some error,  or any plugin that uses EnableSaving or enableSaving in an OnEntitySpawned hook.

Edited by nivex

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Like 25
  • Sad 2
  • Love 49

User Feedback

2.2m

Downloads

Total number of downloads.

10.4k

Customers

Total customers served.

149.9k

Files Sold

Total number of files sold.

3.2m

Payments Processed

Total payments processed.

×
×
  • 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.