Jump to content

Permission Request

Closed 1.2.1 1.2.3

Vergbergler

Posted

Request for permission to be able to extract rare minerals from nodes.

DAez

Posted

I dont understand you. Can you describe in more details?

Vergbergler

Posted

It looks like English is not your first language. I will speak in C# instead. 😁
Add the following code to add "permissions" to use the plugin.
 

private const string PERMISSION_USE = "extractionrareminerals.use";

void Init()
{
    // Add permissions
    permission.RegisterPermission(PERMISSION_USE, this);
}

object OnPlayerAttack(BasePlayer attacker, HitInfo info)
{
	if (permission.UserHasPermission(attacker.UserIDString, PERMISSION_USE) == false)
	{
		return; // Exit function and do not give player minerals, they do not have permission to use this plugin
	}
	// Your code down here...
}

 

DAez

Posted

Changed Status from Pending to Closed

Changed Fixed In to Next Version

DAez

Posted

Check next version.

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.4m
Total downloads
Customers
10.9k
Customers served
Files Sold
156.8k
Marketplace sales
Payments
3.4m
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.