Rename create game element funcs to "spawn"

This commit is contained in:
Vortrex
2023-02-15 03:19:00 -06:00
parent ae0178717c
commit 8ca2e84e62
8 changed files with 156 additions and 109 deletions

View File

@@ -756,4 +756,21 @@ function createNPC(skinIndex, position, heading, interior, dimension) {
return npcIndex - 1;
}
// ===========================================================================
function despawnAllNPCs() {
for (let i in getServerData().npcs) {
destroyGameElement(getServerData().npc[i].npc);
getServerData().npc[i].npc = null;
}
}
// ===========================================================================
function spawnAllNPCs() {
for (let i in getServerData().npcs) {
spawnNPC(i);
}
}
// ===========================================================================