Add some natives wrapping

This commit is contained in:
Vortrex
2021-02-26 13:46:45 -06:00
parent fbd65cd6bd
commit 200ebc3741
6 changed files with 1252 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
// ===========================================================================
// Asshat-Gaming Roleplay
// https://github.com/VortrexFTW/gtac_asshat_rp
// Copyright (c) 2021 Asshat-Gaming (https://asshatgaming.com)
// ---------------------------------------------------------------------------
// FILE: client.js
// DESC: Provides wrapped client natives for RAGEMP
// TYPE: Natives (JavaScript)
// ===========================================================================
// ---------------------------------------------------------------------------
function getClientGame() {
return AG_GAME_GTA_V;
}
// ---------------------------------------------------------------------------
function sendToServer(eventName, ...args) {
mp.events.call(eventName, args);
}
// ---------------------------------------------------------------------------
function receiveFromServer(eventName, handlerFunction) {
mp.events.add(eventName, handlerFunction);
}
// ---------------------------------------------------------------------------