Clan tag menu


(ChimTea) #1

Hi there,

I had an idea to make a menu to put tags on for people of the clan. For example

[Clan]name so ^0[^1Clan^0]^4name

I made this so far

	EDITFIELD( 8, 48, (WINDOW_WIDTH)-4, 10, ">>H2o|", .2, 8, "name" ; "^1>>^0H2o^1|", 36, 18, "Enter the name that you wish to be known by to others on servers" )

The problem is it doesn’t understand the string >>H2o|

So what do i have to do so ET understands this string?

See what i mean here:

Cheers


(ChimTea) #2

Anyone? Post something, it could be the path to :stroggtapir:


(eQuilibrium) #3

Tried with a different clan tag? Just to make sure that’s actually the problem.


(ChimTea) #4

No, that’s not the problem.
I want the input to be [name] but the tag must be in front, so >>H2o|+name.
But I don’t know where to tell et that it should act that way.

We had some sort of command for it first, but it didn’t work.

[command]
command = tag
exec = !rename [1] ^d>>^0H2o^d| [1]
desc = Adds Clan Tag To Players Name.
levels = levels

(Mateos) #5

And with “” to say it’s one group? The Space marks separations usually?


(ChimTea) #6

so you mean make an extra “” around it? like

EDITFIELD( 8, 48, (WINDOW_WIDTH)-4, 10, ">>H2o|", .2, 8, [U]""name" ; "^1>>^0H2o^1|", 36, 18, "Enter the name""[/U] )

or

EDITFIELD( 8, 48, (WINDOW_WIDTH)-4, 10, ">>H2o|", .2, 8, "name" ; [U]""^1>>^0H2o^1|", 36, 18, "Enter the name""[/U] )

Well, maybe this will help:

Error: ui/h2o_options.menu, line 49: unknown menu item keyword ;
Error: ui/h2o_options.menu, line 49: unknown menu item keyword >>H2o|

(Mateos) #7

(Note that I’m not a coder at all :P)

+name is defined in the game, but not the clantag. Maybe code something like +tag=>>H2o?


(Soak) #8

Depending on the mod you could always use a lua script? In fact lua is supported on almost all mods. The added advantage of using lua is that the change will be more permanent.


(phisherman) #9

@sxsweet:
What youre planning to do is not possible with UIscript because it does not support string concatenation.

What you could do though is create a button that will rename the player “<playername>” to “<clantag><playername>”. It’s easy as pie actually: Let the button call a command like “gvemeflamertagplz” and add a function to the lua script that scans the client commands and renames the player whenever this command is issued.

//Nevertheless: Afaik, lua can only issue temporary name changes. Whenever the client disconnects, the name change will be lost. This and also the fact that anybody can press that button makes me wonder if that’s actually a wise feature to be added.


(phisherman) #10

@sxsweet:
What youre planning to do is not possible with UIscript because it does not support string concatenation.

What you could do though is create a button that will rename the player “<playername>” to “<clantag><playername>”. It’s easy as pie actually: Let the button call a command like “gvemeflamertagplz” and add a function to the lua script that scans the client commands and renames the player whenever this command is issued.

//Nevertheless: Afaik, lua can only issue temporary name changes. Whenever the client disconnects, the name change will be lost. This and also the fact that anybody can press that button makes me wonder if that’s actually a wise feature to be added.

//If you need assistance in creating the LUA part, tell me and I’ll get you some example code.