Add some natives wrapping
This commit is contained in:
29
scripts/native/ragemp/client.js
Normal file
29
scripts/native/ragemp/client.js
Normal 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);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user