Jump to content
RAGE Multiplayer Community



Recommended Posts


<!doctype html>
<meta charset="utf-8">
<link rel="stylesheet" href="css/hud.css">
<h1 class="titlearea" id="title">
<span class="pagetitle" >
<script src="js/hud.js"></script>

document.getElementsByClassName("pagetitle")[0].innerHTML = (`${player.name});

If I enter the text instead of player.name, then it changes the "Hello" to text, but for some reason does not change to the player's nickname. Why? Where is the mistake?

Link to comment
Share on other sites

Please show us where you define player.name. Also I believe you have a syntax error at



If player is an object, you would do

document.getElementsByClassName("pagetitle")[0].innerHTML = player.name;


Edited by introzen
Link to comment
Share on other sites

I'm pretty sure you're trying to reach the player property Player::name however I have never attempted that myself. I'm not at my computer right now but I'm pretty sure you should look up


in terms of accessing the player's properties, name in particular.

Edited by introzen
Link to comment
Share on other sites

57 minutes ago, Jigglypuff said:
It still does not work, if you can - help when you're at home

I really can't help you anymore since I'm not familiar with clientside-scripting. Do your research as anyone would; first get a general understanding in how javascript works, then utilize tutorials, example scripts and forum threads to better understand how it's applied in RAGE clientside scripting.

You need to somehow access the player properties and define the variable you're trying to insert in innerHTML. The rest is up to you. I'm sure there'll be people here to help you once you get stuck, however no one will make the script for you.

I can really recommend watching @Stuyk's tutorials on YouTube since they're in-depth but also require you to have basic knowledge for what you're trying to learn. My rule of thumb is that if I don't understand what Stuyk is talking about or doing in his tutorials, I need to read more about the basics and then go back and watch again.

  • Like 1
Link to comment
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...