Skip to main content

HasEntitySharedData

Syntax

```csharp bool NAPI.Data.HasEntitySharedData(Entity entity, string key); ```

Required Arguments

  • entity: parameter input should be in Entity type.
  • key: parameter input should be in string type.

NOTE: This function returns data in bool type.

Usage example(s)

Example Description

```csharp foreach (Vehicle vehicle in NAPI.Pools.GetAllVehicles()) {

   if (NAPI.Data.HasEntitySharedData(vehicle, "VehicleSharedData"))
   \{
       NAPI.Data.RemoveEntitySharedData(vehicle, "VehicleSharedData");
   \}

} ```