Jump to content

Permission Request

Closed 1.2.1 1.2.3

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...
}

 

Share this comment


Link to comment
1.1m

Downloads

Total number of downloads.

5.7k

Customers

Total customers served.

82.1k

Files Sold

Total number of files sold.

1.6m

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.