Merge branch 'nightly' into ragemp

This commit is contained in:
Vortrex
2022-10-25 22:57:40 -05:00
37 changed files with 981 additions and 567 deletions

View File

@@ -1201,32 +1201,32 @@ function bindServerEventHandler(eventName, bindTo, handlerFunction) {
// ===========================================================================
function setElementName(element, name) {
element.name = name;
//element.name = name;
}
// ===========================================================================
function hideElementForPlayer(element, client) {
element.setExistsFor(client, false);
//element.setExistsFor(client, false);
}
// ===========================================================================
function showElementForPlayer(element, client) {
element.setExistsFor(client, true);
//element.setExistsFor(client, true);
}
// ===========================================================================
function setElementShownByDefault(element, state) {
element.netFlags.defaultExistance = state;
//element.netFlags.defaultExistance = state;
}
// ===========================================================================
function createAttachedGameBlip(element, type, size, colour = toColour(255, 255, 255, 255)) {
if (isGameFeatureSupported("attachedBlip")) {
return game.createBlipAttachedTo(element, type, size, colour, true, false);
// return game.createBlipAttachedTo(element, type, size, colour, true, false);
}
}
@@ -1238,6 +1238,11 @@ function deletePlayerPed(client) {
} else {
sendNetworkEventToPlayer("agrp.deleteLocalPlayerPed", client);
}
//if (areServerElementsSupported()) {
// destroyElement(client.player);
//} else {
// sendNetworkEventToPlayer("agrp.deleteLocalPlayerPed", client);
//}
}
// ===========================================================================
@@ -1260,6 +1265,12 @@ function setServerPassword(password) {
// ===========================================================================
function setServerRule(ruleName, ruleValue) {
//server.setRule(ruleName, ruleValue);
}
// ===========================================================================
async function getContentsOfTextFile(filePath) {
let fileContents = fs.readFile(filePath, 'utf8', function (err, data) {
if (err) {