Clear weapon pickups on enter/exit (for SA)

This commit is contained in:
Vortrex
2022-06-26 14:38:37 -05:00
parent 763241d2ce
commit 2181550618
4 changed files with 25 additions and 1 deletions

View File

@@ -72,7 +72,7 @@ function setElementPosition(elementId, position) {
// ===========================================================================
function deleteGameElement(elementId, position) {
function deleteGameElement(elementId, position = toVector3(0.0, 0.0, 0.0)) {
if (!getElementFromId(elementId).isOwner) {
return false;
}
@@ -82,6 +82,12 @@ function deleteGameElement(elementId, position) {
// ===========================================================================
function deleteLocalGameElement(element) {
destroyGameElement(element);
}
// ===========================================================================
function createGameVehicle(modelIndex, position, heading) {
return game.createVehicle(getGameConfig().vehicles[getGame()][modelIndex][0], position, heading);
}