Hello
I’m using NativeUI and CitizenFX, I try to use some function which use PointF and SizeF but I got this error:
C# The type exists in both and 'System.Drawing
GTA V prohibits access to most of System
But NativeUI uses these functions: https://github.com/Guad/NativeUI/wiki/Custom-Banners
You’re trying to pass ints to a constructor that takes floats…
Just put an f
after your number to tell the program you want to you floats. E.g. 0f
.
NativeUI’s wiki uses Int, and I just try with float it doesn’t work : https://image.prntscr.com/image/6d912f71e1c440cc9e09e36a07a9f717.png
The wiki you sent uses the normal Point
and Size
and not the SizeF
and PointF
you’re using.
Also, hover over the underlined text with your mouse, assuming you’re using Visual Studio, this should give you a better explanation as to why it’s underlined.
Thanks for your help, but for both functions I got the same error:
“Size exist in CitizenFX.Core”, I don’t know what is the meaning of this error
Error CS0433 Le type ‘Size’ existe dans 'CitizenFX.Core, Version=0.0.0.0, Culture=neutral,
UP, unfortunately with System.Drawing in reference it fix the problem but it also create an incompatibility between CitizenFX and these functions, someone have a fix?
Drawing is a nativeui function. Are you trying to recreate it in citizenfx? Or just trying to port it over without making any changes to the actual code? Drawing uses native 0x0DF606929C105BE1. It shouldn’t be hard to duplicate what it does.
I don’t recreate anything, I’m just trying to use Sprite with NativeUI, to set a banner
Are you using the citizenfx port or the gta nativeui?
I don’t think I’ve seen anyone use nativeui in fivem. You have an example of someone else’s working code? I noticed citizenfx forked it and in theory ported it??
Yes I’m using citizenfx’s nativeui modification, but I’ve also made some menu with, and there is vehcontrol which uses this mod