Mariusz Posted March 8, 2019 Share Posted March 8, 2019 Hi. I want to get something because I dont know have I set up everything right. I have to say I have no idea why it is not compiling. I feel stupid already (I spent few hours on it). I know how to do it in js client side, but no result in c# client side. What am I missing ? Can I get event based little bite of code that is working for c# client-side that I could experiment with ? Hopeless here. Thanks. using System; using RAGE; namespace RageMpRoleplayClient { public class MainClient { Events.OnPlayerJoin += OnPlayerJoin; public void OnPlayerJoin(RAGE.Elements.Player player) { RAGE.Chat.Output($"Player {player.Name} has joined"); } } } Link to comment Share on other sites More sharing options...
Mariusz Posted March 8, 2019 Author Share Posted March 8, 2019 Found working example. using System; using System.Collections.Generic; using System.Text; using RAGE; using RAGE.Ui; namespace RageMpRoleplayClient { public class TickEvent:RAGE.Events.Script { public TickEvent() { RAGE.Events.Tick = Tick; } private void Tick(List<RAGE.Events.TickNametagData> nametags) { RAGE.Chat.Show(true); RAGE.Chat.Output("Working"); } } } Link to comment Share on other sites More sharing options...
hayden392 Posted March 13, 2019 Share Posted March 13, 2019 FWIW, everywhere I've seen a similar example, it was Rage.Events.Tick += Tick, which I assume stops you from overwriting every other resource's tick handler. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now