Use util to properly clear arrays
This commit is contained in:
@@ -1450,7 +1450,7 @@ function reloadAllBusinessesCommand(command, params, client) {
|
||||
}
|
||||
|
||||
//forceAllPlayersToStopWorking();
|
||||
getServerData().businesses = null;
|
||||
clearArray(getServerData().businesses);
|
||||
getServerData().businesses = loadBusinessesFromDatabase();
|
||||
createAllBusinessPickups();
|
||||
createAllBusinessBlips();
|
||||
|
||||
@@ -1184,7 +1184,7 @@ function reloadAllHousesCommand(command, params, client) {
|
||||
deleteHouseEntrancePickup(i);
|
||||
}
|
||||
|
||||
getServerData().houses = null;
|
||||
clearArray(getServerData().houses);
|
||||
getServerData().houses = loadHousesFromDatabase();
|
||||
createAllHousePickups();
|
||||
createAllHouseBlips();
|
||||
|
||||
@@ -218,7 +218,7 @@ function getRadioStationData(radioStationId) {
|
||||
|
||||
function reloadAllRadioStationsCommand(command, params, client) {
|
||||
stopRadioStreamForPlayer(null);
|
||||
getServerData().radioStations.splice(0, getServerData().radioStations.length-1);
|
||||
clearArray(getServerData().radioStations);
|
||||
getServerData().radioStations = loadRadioStationsFromDatabase();
|
||||
setRadioStationIndexes();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user