Author: code34
Author Website:

Requirements: INIDBI2

Version: 0.91

Short description: Create a main bus message between clients and server.

Support the author:

100% of your donation goes directly to the author of this content!
Date: 2018-09-19 13:55

Comments: (1)


Object Oriented Persistent Data World (OO PDW)


OO PDW is a class (object oriented) that permits to save & restore world and players datas and make worlds persistent. This object uses Object Oriented SQF scripting of Naught and requires the INIDBI addon.

- Save & restore all objects
- Save & restore players/units
- Save & restore inventory

Installation / Usage:
Put the "oo_pdw.sqf" and the "oop.h" files in your mission directory
Put this code into your mission init.sqf
Call compilefinal preprocessFileLineNumbers "oo_pdw.sqf"
See example mission in directory: init.sqf

[] call compilefinal preprocessFileLineNumbers "oo_pdw.sqf";
		sleep 2;

		 _pdw = ["new"] call OO_PDW;
		["saveUnit", [name player, player]] call _pdw;
		["saveInventory", [name player, player]] call _pdw;

		sleep 2;

		hint "Restore Unit";
		_object = ["loadUnit", name player] call _pdw;

		sleep 2;

		hint "Clear inventory";
		["clearInventory", _object] call _pdw;
		sleep 2 ;

		hint "Restore Inventory";
		["loadInventory", [name player, _object]] call _pdw;
		sleep 2;

		hint "Save all objects";
		"saveObjects" call _pdw;

		sleep 2;
		hint "Delete all objects";
		{deletevehicle _x;}foreach vehicles;

		sleep 2;
		_objects = "loadObjects" call _pdw;
		hint format ["Restore all objects %1", _objects];

Under Gpl, you can share, modify, distribute this script but don't remove the licence and the name of the original author

fix including / excluding objects (duplicate objects)

v0.9 - update oop.h
- add setIncludingTypes method from contributor: [LTC] Vegas =21st=
- add debug entry points
- fix private keywords
- fix array reference
- fix clearcargo
- add setSaveName method to use pdw with differents missions :)

- Add setIncludingMarkers method
- Add setExcludingMarkers method
- Add setAroundPos method
- Add setExcludingTypes method
- Add setExcludingObjects method
- Add setIncludingObjects method
- Delete saveObjectsAroundPos method
- Delete saveObjectsInMarkers method
- Delete saveObjectsOutOfMarkers method
- Delete saveObjectsExcludingObjects method
- Delete saveObjectsExcludingTypes
- Control type methods parameters

- fix magazines count for infantry
- turn off gps add
- fix binocular not assigned
- Add saveObjectsAroundPos method
- Add saveObjectsInMarkers method
- Add saveObjectsOutOfMarkers method
- Add saveObjectsExcludingObjects method
- Add saveObjectsExcludingTypes

- fix return values of methods
- add savePlayers & loadPlayers methods
- add saveGroups & loadGroups methods
- fix initServer.sqf example for MP servers
- update documentation

- Compatibilty with inidbi2 (inidbi1 is not anymore compatible)
- fix saveObjects method

- re factory saveUnit, loadUnit, saveObject, loadObject
- add saveObjects, loadObjects
- add saveInventory, loadInventory, clearInventory
- add more doc

- fix reload
- fix function names
- fix example codes

- fix typo error, fix adduniform

- first release


Forum topic:
- BI forums

Enable javascript to be able to download from Armaholic please!

Tags: No tags