Sign in to follow this  
kokenya

Trigger a Server function to Client

Recommended Posts

        [RemoteEvent("getPlayerFactions")]
        public List<NewFactionModel> getPlayerFactionsEvent(Client player)
        {
            int pid = player.GetSharedData(EntityData.PLAYER_SQL_ID);
            var Lista = factionList.Where(x => x.members.Any(y => y.Key == pid)).ToList();
            return Lista;
        }

I want to use this list in my clientsided c# code. How can I trigger it?

Share this post


Link to post
Share on other sites
Posted (edited)
player.TriggerEvent("eventname", NAPI.Util.ToJson(Lista));

 

Edited by TimoW
  • Like 1

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.