Releases: AlternateLife/RageMP.Net
V1.2.0
Changelog
This version is dedicated to a greatly improved usability and stability towards our current goal to create a crash-resistant API.
We tried to create an API that is all async, but we came to the point that this way of implementing it introduced a hig overhead while calling it. So now we offer next to all async-methods their sync versions. This gives the opportunity to group calls into their own MP.Schedule
-call and reduce the needed scheduling calls to a minimum. This should not introduce a more compicated way of implementing it, because MP.Utility.Schedule
should be awaitable as every API, too.
Example:
// Before
public async Task DoSomethingAsync(IPlayer player) {
await player.SpawnAsync();
await player.SetHealthAsync(50);
await player.SetPositionAsync(new Vector3(50f, 50f, 50f));
await player.SetRotationAsync(new Vector3(0f, 0f, 12f);
}
// After
public async Task DoSomethingAsync(IPlayer player) {
await MP.Utility.Schedule(() => {
player.Spawn();
player.SetHealth(50);
player.SetPosition(new Vector3(50f, 50f, 50f));
player.SetRotation(new Vector3(0f, 0f, 12f);
});
}
Added
- Added new CommandHandler that is able to parse parameters and convert them to fit the given signature.
See documentation
Changed
- Reworked all asynchronous methods and added synchronized variants.
- Reduced dockerimage size from ~800MB to ~80 MB.
- Set all versions in Dockerimage dependencies to a fixed version to avoid unwanted upgrades.
- Replaced all events with .NET coding convention compliant versions.
(object sender, EventArgs args)
- All parameters that contained
ColorRgba
now useSystem.Drawing.Color
instead. - Moved
MP.Joaat
andMP.Schedule
toMP.Utility
class.
Deprecated
MP.Joaat
MP.Schedule
Changes between V1.1.4 and V1.2.0
Upgrade-Guide from V1.1.4 to V1.2.0
V1.1.4
V1.1.3
Changelog
- Changed assembly startup to execute first and then continue as usual.
- This should fix the
PlatformNotSupportedException
issue by MySQL
- This should fix the
Info: Please replace the folders dotnet/plugins
, dotnet/runtime
and plugin/dotnet-wrapper.dll
with the new ones in this release!
V1.1.2
V1.1.1
V1.1.0
V1.0.3
V1.0.2
V1.0.1
Changed
- Add string validation for player names, blip names, vehicle numberplate, textlabel text and command names.
- Various internal improvements.
Fixed
- ClientEvents and SharedEntityData will now receive a
string
-value instead of anIntPtr
if the value was an unknown object. - The example resource now registers all events inside the constructor as suggested in our documentation.