Jump to content

Raidable Bases 3.1.3

$40.00 $30.00
   (70 reviews)

1 Screenshot

  • 711.9k
  • 46k
  • 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

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.3k

Customers

Total customers served.

148.5k

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.