Difference between revisions of "Resource setInheritAccess"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "= Resource_setInheritAccess = UPDATE ME PLEASE! Category:Resource_Functions __NOTOC__")
 
 
Line 1: Line 1:
 +
[[Category:Resource_Functions]]
 
= Resource_setInheritAccess =
 
= Resource_setInheritAccess =
 +
Set inherit access for a resource
 +
 +
== Syntax ==
 +
 +
Resource_setInheritAccess(number ResourceId[, bool inherit]);
 +
 +
== Arguments ==
  
UPDATE ME PLEASE!
+
number ''resourceRId'': Resource unique id
  
[[Category:Resource_Functions]]
+
bool ''inherit''
__NOTOC__
+
 
 +
== Return type ==
 +
Empty
 +
 
 +
== Example ==
 +
 
 +
<source lang="javascript">
 +
//inherit parameter is optional, can be empty. In this case inherit default will be set to true
 +
number ResourceId = 11088827;
 +
Resource_setInheritAccess(ResourceId);
 +
Resource_isInheritAccess(ResourceId);//true
 +
</source>
 +
 
 +
[[File:2018-06-07_10-56-55.png]]
 +
 
 +
<source lang="javascript">
 +
// set inherit to false
 +
number ResourceId = 11088827;
 +
bool inherit = false;
 +
Resource_setInheritAccess(ResourceId, inherit);
 +
Resource_isInheritAccess(ResourceId);//false
 +
</source>
 +
 
 +
[[File:2018-06-07_10-45-59.png]]

Latest revision as of 05:02, 7 June 2018

Resource_setInheritAccess

Set inherit access for a resource

Syntax

Resource_setInheritAccess(number ResourceId[, bool inherit]);

Arguments

number resourceRId: Resource unique id

bool inherit

Return type

Empty

Example

//inherit parameter is optional, can be empty. In this case inherit default will be set to true
number ResourceId = 11088827;
Resource_setInheritAccess(ResourceId);
Resource_isInheritAccess(ResourceId);//true

2018-06-07 10-56-55.png

// set inherit to false
number ResourceId = 11088827;
bool inherit = false;
Resource_setInheritAccess(ResourceId, inherit);
Resource_isInheritAccess(ResourceId);//false

2018-06-07 10-45-59.png