Tons of fixes, change netevent prefix.

This commit is contained in:
Vortrex
2021-07-18 20:39:49 -05:00
parent e29bf420de
commit 9ce391ef9a
35 changed files with 898 additions and 559 deletions

View File

@@ -275,6 +275,12 @@ function setElementDimension(element, dimension) {
// ===========================================================================
function setElementRotation(element, rotation) {
return element.setRotation(rotation);
}
// ===========================================================================
function givePlayerHealth(client, amount) {
if(getPlayerHealth(client)+amount > 100) {
logToConsole(LOG_DEBUG, `Setting ${getPlayerDisplayForConsole(client)}'s health to 100`);
@@ -321,4 +327,34 @@ function getServerName() {
return server.name;
}
// ===========================================================================
function createGamePickup(model, position) {
return gta.createPickup(model, position);
}
// ===========================================================================
function createGameObject(model, position) {
return gta.createObject(model, position);
}
// ===========================================================================
function setElementOnAllDimensions(element, state) {
element.onAllDimensions = state;
}
// ===========================================================================
function destroyGameElement(element) {
destroyElement(element);
}
// ===========================================================================
function isMeleeWeapon(weaponId, gameId = getServerGame()) {
return (getGameData().meleeWeapons[gameId].indexOf(weaponId) != -1);
}
// ===========================================================================