class CEApiSource
Constructors 2
private void CEApi()private void ~CEApi()Methods 63
proto native void ExportSpawnData()Regenerates "storage/spawnpoints.bin" if necessary
GetCEApi().ExportSpawnData();Generates "storage/export/mapgrouppos.xml"
vCentervectorCenter of area to generate fromfRadiusfloatRadius in meters of area to generate from
// Export for whole map
GetCEApi().ExportProxyData();proto native void ExportClusterData()Generates "storage/export/mapgroupcluster.xml"
GetCEApi().ExportClusterData();proto native void ExportProxyProto()Generates "storage/export/mapgroupproto.xml"
GetCEApi().ExportProxyProto();Invalidates loot spawn points which are closer than the radius supplied
fRadiusfloatThe minimum desired distance in meters between loot spawn pointsbAllSelectionsboolWhen false, will only check the points within a container against each other, when true will against all points
// Example: I want there to be a minimum distance of 0.3m between any loot spawn point
GetCEApi().MarkCloseProxy(0.3, true);proto native void RemoveCloseProxy()Removes all invalid points
GetCEApi().RemoveCloseProxy();proto native void ListCloseProxy(float fRadius)Outputs a list of all loot points closer than specified radius
fRadiusfloatThe minimum desired distance in meters between loot spawn points
GetCEApi().ListCloseProxy(0.3);Will emulate the spawning of the item which is being looked at and generate images (.tga) in storage/lmap and output logs
sClassNamestringThe class name of the desired item to analyze
Returns: bool Whether the operation was successful, it might fail in certain scenarios if the CE doesn't update in time
GetCEApi().SpawnAnalyze("FlatCap_Grey");proto native void TimeShift(float fShift)Subtracts the supplied value from the current lifetime of all items in the world
fShiftfloatThe value in seconds which will be subtracted from the current lifetimes
// Shortens the lifetimes of all items in the world by 3 seconds
GetCEApi().TimeShift(3);proto native void OverrideLifeTime(float fLifeTime)Fills in the Debug Lifetime, which will be used for any new DE spawned
fLifeTimefloatThe lifetime for any DE spawned after this call
// Any DE spawned after this call will have a lifetime of 300 seconds
GetCEApi().OverrideLifeTime(300);Force spawn specific prototype group + loot at position
sGroupNamestringThe group name to spawnvPosvectorThe position to spawn the Entity atfAnglefloatAngle to spawn the Entity with in degrees [0, 360]
Returns: Entity The spawned Entity or null if unsuccessful
GetCEApi().SpawnGroup("Land_Shed_M1", Vector(5, 10, 5));Force spawn specific dynamic event
sEvNamestringThe DE to spawnvPosvectorThe position to spawn the Entity atfAnglefloatAngle to spawn the Entity with in degrees [0, 360]
Returns: bool Whether the spawn was successful
GetCEApi().SpawnDE("StaticHeliCrash", Vector(5, 10, 5));Force spawn specific dynamic event
sEvNamestringThe DE to spawnvPosvectorThe position to spawn the Entity atfAnglefloatAngle to spawn the Entity with in degrees [0, 360]uFlagsintECE flags to apply while spawning the DE
Returns: bool Whether the spawn was successful
GetCEApi().SpawnDEEx("StaticHeliCrash", Vector(5, 10, 5), ECE_FULL);proto native void SpawnLoot(string sEvName, vector vPos, float fAngle, int iCount = 1, float fRange = 1)Spawn an item through CE
sEvNamestringThe DE to spawnvPosvectorThe position to spawn the Entity atfAnglefloatAngle to spawn the Entity with in degrees [0, 360]iCountintThe amount of itemsfRangefloatCircle radius
GetCEApi().SpawnLoot("Deagle", Vector(5, 10, 5), 0, 9, 1);Spawn all entities with dynamic category through CE
vPosvectorThe position to spawn the Entities atbShowCylindersboolWhether to draw the CE BBox with debug shapesfDefaultDistancefloatThe default distance to use when the entity does not have a CE BBox
GetCEApi().SpawnDynamic(Vector(5, 10, 5), true);proto native void SpawnVehicles(vector vPos, bool bShowCylinders = false, float fDefaultDistance = 20)Spawn all entities with vehicles category through CE
vPosvectorThe position to spawn the Entities atbShowCylindersboolDoes nothing for Vehicles, left for backwards compatfDefaultDistancefloatThe default distance to use when the entity does not have a CE BBox
GetCEApi().SpawnVehicles(Vector(5, 10, 5));proto native void SpawnBuilding(vector vPos, bool bShowCylinders = false, float fDefaultDistance = 20)Spawn all entities with building category through CE
vPosvectorThe position to spawn the Entities atbShowCylindersboolWhether to draw the CE BBox with debug shapesfDefaultDistancefloatThe default distance to use when the entity does not have a CE BBox
GetCEApi().SpawnBuilding(Vector(5, 10, 5), true);Spawn an entity through CE
sClassNamestringThe entity to spawnvPosvectorThe position to spawn the Entity atfRangefloatCircle radiusiCountintThe amount of items
GetCEApi().SpawnEntity("Deagle", Vector(5, 10, 5), 1, 9);Spawn an entity through CE
sClassNamestringThe entity to spawnvPosvectorThe position to spawn the Entity at
Returns: Object The spawned Object
GetCEApi().SpawnSingleEntity("Deagle", Vector(5, 10, 5));proto native void SpawnRotation(string sClassName, vector vPos, float fRange, int iCount, int iFlags)Spawn an entity through CE
sClassNamestringThe entity to spawnvPosvectorThe position to spawn the Entity atfRangefloatCircle radiusiCountintThe amount of itemsiFlagsintThe rotation flags to apply
GetCEApi().SpawnRotation("Deagle", Vector(5, 10, 5), 1, 9, RF_ALL);Spawn an entity through CE, x amount of times in a grid
sClassNamestringThe entity to spawniCountintThe amount of items
GetCEApi().SpawnPerfTest("Deagle", 30);proto native void CleanMap()Queue up the depleting of lifetime of everything in the world
GetCEApi().CleanMap();proto native void EconomyLog(string sLogType)Outputs debug file to storage/log/*.csv
sLogTypestringThe type of log (EconomyLogCategories)
GetCEApi().EconomyLog(EconomyLogCategories.Economy);proto native void EconomyMap(string sMapType)Outputs debug file to storage/lmap/*.tga showing the current places this is spawned
sMapTypestringThe type of lmap, can be just a class name or a special string
// To check only a specific item
GetCEApi().EconomyMap("Deagle");Outputs debug logs into server log or rpt
sOutputTypestringOne of the strings specified in EconomyOutputStringsfRangefloatRange parameter used for some of the options
GetCEApi().EconomyOutput(EconomyOutputStrings.CLOSE, 3);Process lifetime increase within radius by value (sec)
vCentervectorThe center pointfRadiusfloatThe radius around the center pointfValuefloatThe value to increase the lifetime by
GetCEApi().RadiusLifetimeIncrease(Vector(500, 0, 500), 3, 500);Process lifetime decrease within radius by value (sec)
vCentervectorThe center pointfRadiusfloatThe radius around the center pointfValuefloatThe value to decrease the lifetime by
GetCEApi().RadiusLifetimeDecrease(Vector(500, 0, 500), 3, 500);Process lifetime reset to default value from DB within radius
vCentervectorThe center pointfRadiusfloatThe radius around the center point
GetCEApi().RadiusLifetimeReset(Vector(500, 0, 500), 3);Get int from globals.xml
varNamestringThe name of the entry
Returns: int The value or int.MIN if not found/not an int
Get float from globals.xml
varNamestringThe name of the entry
Returns: float The value or float.MIN if not found/not a float
Get string from globals.xml
varNamestringThe name of the entry
Returns: string The value or empty string if not found/not a string
Check if there is a player within a radius
vPosvectorThe center pointfDistancefloatThe radius around the center point
Returns: bool Returns false when there is a player inside supplied area, true when it successfully avoided players
GetCEApi().AvoidPlayer(Vector(500, 0, 500), 20);Check if there is a vehicle within a radius
vPosvectorThe center pointfDistancefloatThe radius around the center pointsDENamestringA specific DE to avoid, if left empty, will avoid all vehicles
Returns: bool Returns false when there is a vehicle inside supplied area, true when it successfully avoided vehicles
GetCEApi().AvoidVehicle(Vector(500, 0, 500), 500, "VehicleCivilianSedan");Check if there is a vehicle within a radius
vPosvectorThe center pointfRangefloatThe radius around the center point
Returns: int The amoutn of players inside supplied area
GetCEApi().CountPlayersWithinRange(Vector(500, 0, 500), 500);proto native void LootSetSpawnVolumeVisualisation(ESpawnVolumeVis mode)"Spawn Volume Vis"
proto native void LootToggleSpawnSetup(bool mode)"Setup Vis"
proto native void LootToggleVolumeEditing(bool mode)"Edit Volume"
proto native void LootRetraceGroupPoints()"Re-Trace Group Points"
proto native void LootExportGroup()"Export Group >>"
proto native void LootExportAllGroups()"Export All Groups >>>>" / GetCEApi.ExportProxyProto();
proto native void LootExportMap()"<<< Export Map" / GetCEApi.ExportProxyData(vector.Zero, 0);
proto native void LootExportClusters()"<<< Export Clusters" / GetCEApi().ExportClusterData()
proto native void LootDepleteLifetime()"Deplete Lifetime"
proto native void LootSetDamageToOne()"Set Damage = 1.0"
proto native void LootDepleteAndDamage()"Damage + Deplete"
proto native void InfectedToggleVisualisation(bool mode)"Infected Vis"
proto native void InfectedToggleZoneInfo(bool mode)"Infected Zone Info"
proto native void InfectedSpawn()"Infected Spawn"
proto native void InfectedResetCleanup()"Reset Cleanup"
proto native void AnimalSpawn()"Animal Spawn"
proto native void AnimalAmbientSpawn()"Ambient Spawn"
proto native void ToggleVehicleAndWreckVisualisation(bool mode)"Vehicle&Wreck Vis"
proto native void ToggleLootVisualisation(bool mode)"Loot Vis"
proto native void ToggleClusterVisualisation(bool mode)"Cluster Vis"
proto native void ToggleDynamicEventStatus(bool mode)"Dynamic Events Status"
proto native void ToggleDynamicEventVisualisation(bool mode)"Dynamic Events Vis"
proto native void DynamicEventSpawn()"Dynamic Events Spawn"
proto native void DynamicEventExport()"Export Dyn Event >>"
proto native void ToggleOverallStats(bool mode)"Overall Stats"
proto native void PlatformStatTest()\name DEPRECATED/LEGACY These don't do anything anymore but are left for backwards compatibility
proto native void LootToggleProxyEditing(bool mode)proto native void OnUpdate()