Add RMP native

This commit is contained in:
Vortrex
2022-10-17 00:36:48 -05:00
parent 9c8593e833
commit 0d57fb3186

View File

@@ -3,11 +3,13 @@
// https://github.com/VortrexFTW/agrp_main // https://github.com/VortrexFTW/agrp_main
// (c) 2022 Asshat Gaming // (c) 2022 Asshat Gaming
// =========================================================================== // ===========================================================================
// FILE: connected.js // FILE: ragemp.js
// DESC: Provides wrapped natives for GTA Connected and Mafia Connected mods // DESC: Provides wrapped natives for RAGEMP
// TYPE: Server (JavaScript) // TYPE: Server (JavaScript)
// =========================================================================== // ===========================================================================
var fs = require('fs');
let builtInCommands = [ let builtInCommands = [
]; ];
@@ -1236,7 +1238,6 @@ function deletePlayerPed(client) {
} else { } else {
sendNetworkEventToPlayer("agrp.deleteLocalPlayerPed", client); sendNetworkEventToPlayer("agrp.deleteLocalPlayerPed", client);
} }
} }
// =========================================================================== // ===========================================================================
@@ -1248,19 +1249,25 @@ function isPlayerOnBoat(client) {
// =========================================================================== // ===========================================================================
function setServerName(name) { function setServerName(name) {
server.name = name; //server.name = name;
} }
// =========================================================================== // ===========================================================================
function setServerPassword(password) { function setServerPassword(password) {
server.setPassword(password); //server.setPassword(password);
} }
// =========================================================================== // ===========================================================================
function getContentsOfTextFile(filePath) { async function getContentsOfTextFile(filePath) {
return ""; let fileContents = fs.readFile(filePath, 'utf8', function (err, data) {
if (err) {
console.error("Could not open file: %s", err);
} else {
return data;
}
});
} }
// =========================================================================== // ===========================================================================