Jump to content
RAGE Multiplayer Community

Event.Tick passing List<Events.NametagData> with value of null


Recommended Posts

Hello,

 

I was wondering why I am getting null list of nametags?

https://wiki.rage.mp/index.php?title=Render(JS)_Tick(CSharp)

 

using System;
using System.Collections.Generic;
using RAGE;
using RAGE.Game;
using RAGE.Ui;

namespace Test
{
    public class Class1 : Events.Script
    {
        public Class1()
        {
            Nametags.Enabled = true; // doesn't work if I switch it to false either
            Events.Tick += OnUpdate;
        }

        private void OnUpdate(List<Events.TickNametagData> nametags)
        {
            if (nametags != null)
                Chat.Output(nametags.Count.ToString());
            else Chat.Output("Still null");
        }
    }
}

 

Edited by WaspNetwork
Link to post
Share on other sites
  • WaspNetwork changed the title to Event.Tick passing List<Events.NametagData> with value of null

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...