EntityExtensions
FivePD.API.Utils
#
Namespace: Source/Utils/EntityExtensions.cs
#
File: #
Blip extensions#
SyncBlip#
ExampleBlip myBlip = await World.CreateBlip(...);// set up your blipmyBlip.Sync();Blip myBlip = await World.CreateBlip(...);// set up your blipmyBlip.Sync(100f); // sync blip with radius
#
SyncDelete#
ExampleBlip myBlip = await World.CreateBlip(...);// set up your blipmyBlip.Sync();...// later you might want to delete itmyBlip.SyncDelete();
#
Ped extensions#
GetData#
ExamplePed ped; // use an already existing ped...var pedData = await ped.GetData();
#
SetData#
ExamplePed ped; // use an already existing ped...PedData pedData = new PedData();// set ped data (eg. name, etc.) (same props as in Utilities)ped.SetData(pedData);
#
GetClosest#
ExamplePed closestToPlayer = Game.PlayerPed.GetClosest(); // returns the cloest ped to the player
#
Vehicle extensions#
GetData#
ExampleVehicle vehicle; // use an already existing vehicle...var vehicleData = await vehicle.GetData();
#
SetData#
ExampleVehicle vehicle; // use an already existing vehicle...VehicleData vehicleData = new VehicleData();// set vehicle data (same props as in Utilities)vehicle.SetData(vehicleData);