altmp / altv-issues

Issues and roadmap for alt:V project
93 stars 17 forks source link

Vehicle Dirtlevel in C# as float not byte like javascript #1012

Closed Doxoh closed 3 years ago

Doxoh commented 3 years ago

Suggestion On javascript the dirtLevel of the vehicle is in float (https://natives.altv.mp/#/0x79D3B596FE44EE8B), on c# it is in byte. And add the description that dirtlevel ist between 0.0 an 15.0

Use cases Same object type on both languages

Describe the solution you'd like

        public float DirtLevel
        {
            get
            {
                unsafe
                {
                    CheckIfEntityExists();
                    return Server.Library.Vehicle_GetDirtLevel(NativePointer);
                }
            }
            set
            {
                unsafe
                {
                    CheckIfEntityExists();
                    Server.Library.Vehicle_SetDirtLevel(NativePointer, value);
                }
            }
        }

Describe alternatives you've considered Nothing

Additional context Nothing

FabianTerhorst commented 3 years ago

Dirt level is internally a byte thats why its in c# a byte. We don't use natives thats why it has different values then used in natives.