[C#] TriggerServerEvent

Yeah… I’m not sure if its the way to do it, but its how I got it to work :grin:

Did you ever figure out the NUI stuff?

Unfortunately, no. No matter what I do, I always end up with “Resource ‘name’ has no UI frame.”

Oh… are you sending the nui message with C# or Lua? I couldnt figure out the shit with C#, so I just made an event in Lua that I triggered for it.

What exactly is your issue with the no ui frame? When/where do you get that error?

1 Like

I’ve only been trying NUI with Lua, as C# is a rather long way around it. If I remember correctly the error happens when I start the resource. Be default, though, when the resource starts it’s supposed to hide the UI, so it triggers an event that uses the send nui.

I’m not sure, but that might be the issue, because it is sending that message when the player isn’t fully loaded yet. Instead of doing that, in the css, try doing display:none;. That will hide whatever element(s). Then, when you want the stuff to show, just trigger that when the player is in.

@Briglair Do you know of any useful tutorials other than this one?

I dont :confused: