[C#] ≈5% Time and ≈0.04 ms

Hey, I have a problem with C# script, whatever I do always have ≈5% Time and ≈0.04 ms. Even if my scrypt is empty ( just the code Debug.WriteLine(“hello world”); ).
For three days, he has been trying to find a solution, but without success. I tried use Mono rt2, but it didn’t help.

Anyone have any ideas what I’m doing wrong in my code?

My project: GitHub - mikoslaf/c_follow

You are not doing anything wrong. If I am not mistaken it is because of loaded CitizenFX library.

1 Like

Are you sure you properly used mono_rt2?

With the base c# runtime (mono_rt2 shouldn’t have this) you’re going to always have 0.04-0.05ms overhead from the actual runtime

I think so too, but I saw the script with 0.0 Time and 0.0 ms like this GitHub - randomsean/RS9000: FiveM Police Radar System

You know how people do it? I think he didn’t use mono_rt2

I 10 times, tiried use mono_r2 and I always have some results. I have the same time as always or my script just doesn’t do anything. Maybe I just don’t know how to use mono_rt2.

This is my project, but with mono_rt (this doesn’t do anything) GitHub - mikoslaf/c_follow_mono_v2

I did everything step by step as it is written here.

Can you show your fxmanifest.lua?

Of course, this is fxmanifest.lua from my basic code:

fx_version 'bodacious'
game 'gta5'


ui_page 'nui/index.html'

files {
    'nui/index.html',
    'nui/follow.js',
    'nui/style.css'
}

client_script 'Client/bin/Release/net452/publish/c_follow.Client.net.dll'

This is fxmanifest.lua when, I tried use mono_rt2:

fx_version 'cerulean'
game 'gta5'

rt2 'on'

ui_page 'nui/index.html'

files {
    'nui/index.html',
    'nui/follow.js',
    'nui/style.css'
}

client_scripts {
    'CitizenFX.Core.dll',
    'CitizenFX.FiveM.Native.dll',
    'CitizenFX.FiveM.dll',
    'c_follow_mn2.net.dll'
}

I tried using clr or mono_rt2 instead of rt2.

Please see #6 on the setup you’re not properly setting the mono_rt2 variables.

1 Like

This working, I didn’t expect to have to give such an inscription there. Thanks
(but now I have a lot of errors, I will work on it )