Using server natives with C#


#1

@magnesium sorry i’m new to dev, can you please give me an exemple on how to use the CitizenFX.Core.Native.API
(just in few lines )


[Release] [C#] Native Compiler
#2

Oooo, me me me…

“Just like any other C# library”

Oh… It’s just the one… My bad, you said you wanted a few lines :stuck_out_tongue:


#3

when i try to use is i have only 29 method, or in the screen shot i think he got more
image


#4

That’s because you need to call the native function. I think it’s Function.Call and you pass it a hash for the native.


#5

image
they are givin the same result
but maybe I miss understanding the whole thing
My goal is to use those function in a structural way with C# (if possible)

https://runtime.fivem.net/doc/reference.html#_0x424D4687FA1E5652


#6

That’s because there’s only that few on the server. Try making a client script, using the client’s CitizenFX.Core.dll.


#7

ok, they are all using a framework that masks the complexity.
yes, it will be easy but it limits your creativity
anyway thank you, if I figure out how to do it I will post back here.