Add some utils to RageMP natives script
This commit is contained in:
@@ -1222,4 +1222,28 @@ function bindServerEventHandler(eventName, bindTo, handlerFunction) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
|
|
||||||
|
function setElementName(element, name) {
|
||||||
|
element.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
|
|
||||||
|
function hideElementForPlayer(element, client) {
|
||||||
|
element.setExistsFor(client, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
|
|
||||||
|
function showElementForPlayer(element, client) {
|
||||||
|
element.setExistsFor(client, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
|
|
||||||
|
function setElementShownByDefault(element, state) {
|
||||||
|
element.netFlags.defaultExistance(state);
|
||||||
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
Reference in New Issue
Block a user