Jump to content
Lurjoo

NPC PlayerTag/Color

Recommended Posts

So I'm trying to add a Player-Tag above the NPC's head, for example if a NPC is a Clothing Store it would visibly say above the NPC "Clothing Store" and under that "NPC" with orange text. Like the normal online players.

What would you say is your understanding of SQF and or SQL on a scale of 1/10: 5/10

Do you understand that if your issue is solved we suggest that you add a "Solved" reply to your topic?: Yes

Tanoa Life SQM 5.0.0

Share this post


Link to post
Share on other sites

Add this into the init of the Clothing Store and you should be able to see a nametag over the NPC, if you want to add the "NPC" text below it will require more editing but should be quite easy, check in fn_playerTags.

this setVariable ["realname","Clothing Store"]; 

Share this post


Link to post
Share on other sites
8 hours ago, Hyper4u.'<3 said:

Add this into the init of the Clothing Store and you should be able to see a nametag over the NPC, if you want to add the "NPC" text below it will require more editing but should be quite easy, check in fn_playerTags.

this setVariable ["realname","Clothing Store"]; 

Okay so settings this to the NPC in the editor will show their name, but I wanna change the text, do you have any idea where to change this because I tried and it bugged the thing out with orange text saying NPC under, and color didnt even show. 

As for the masked player if someone wears a mask the players name disappear it woul be better if it said "Masked Player, or Unknown"

Thanks for the respond!

Share this post


Link to post
Share on other sites
3 hours ago, Lurjoo said:

Okay so settings this to the NPC in the editor will show their name, but I wanna change the text, do you have any idea where to change this because I tried and it bugged the thing out with orange text saying NPC under, and color didnt even show. 

As for the masked player if someone wears a mask the players name disappear it woul be better if it said "Masked Player, or Unknown"

Thanks for the respond!

this setVariable ["realname","<t color='#0000ff'>Clothing Store</t>"];

Then change #0000ff to what ever color you want.

Share this post


Link to post
Share on other sites
19 hours ago, GraveYard said:
this setVariable ["realname","<t color='#0000ff'>Clothing Store</t>"];

Then change #0000ff to what ever color you want.

Yes and it works, but I think the positioning is off, or does it look like this?

https://prnt.sc/qrsr5v

Share this post


Link to post
Share on other sites
1 minute ago, GraveYard said:

As far as I can see it looks normal 

Do you recon I can use a <br> to make a text under the Store name with a different color?

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.