Перейти к содержанию

HasEntitySharedData

Материал из RAGE MP Wiki Archive
Версия от 19:37, 22 декабря 2022; imported>Xabi (Created page with "==Syntax== <syntaxhighlight lang="C#" >bool NAPI.Data.HasEntitySharedData(Entity entity, string key);</syntaxhighlight> '''Required Arguments''' *'''entity:''' parameter inpu...")
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

Syntax

<syntaxhighlight lang="C#" >bool NAPI.Data.HasEntitySharedData(Entity entity, string key);</syntaxhighlight>

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 <syntaxhighlight lang="C#" > foreach (Vehicle vehicle in NAPI.Pools.GetAllVehicles()) {

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

}</syntaxhighlight>