Plz help me! about Sorted Array!

> Create HUD Text(Local Player, Null, Custom String("the richest man in this country"),Custom String("{0} {1} {2}",
	        Hero Icon String(Hero Of(Sorted Array(All Players(All Teams), Current Array Element.A + Current Array Element.B))), 
 			Sorted Array(All Players(All Teams), Current Array Element.A + Current Array Element.B), 
			Custom String("{0} !", Sorted Array(All Players(All Teams),
			Current Array Element).A + Sorted Array(All Players(All Teams), Current Array Element).B)), 
			Top, 2, Color(White), Color(Yellow), Color(White),Visible To and String, Default Visibility);

I want to display the richest person in the country on the screen, and if I do this, I get an error. How do I mark one of the richest people?

Event Player.A = 150; ← This is the cash that the player has

Event Player.B = 0; <–This is the player’s bank money

I want to add these two variables to display the richest man on the screen.

Don’t recall whether it’s Last of or First Of to get highest; I’d say Last Of but don’t pin me on that.

Create HUD Text(Local Player, Null, Custom String("the richest man in this country"),Custom String("{0} {1} {2} !",
	        Hero Icon String(Hero Of(Last Of(Sorted Array(All Players(All Teams), Current Array Element.A + Current Array Element.B)))), 
 			Last Of(Sorted Array(All Players(All Teams), Current Array Element.A + Current Array Element.B)), 
			Last Of(Sorted Array(All Players(All Teams),
			Current Array Element.A + Current Array Element.B)).A + Last Of(Sorted Array(All Players(All Teams), Current Array Element.A + Current Array Element.B)).B, 
			Top, 2, Color(White), Color(Yellow), Color(White),Visible To and String, Default Visibility);

Does the player’s nickname change when the other richest person comes out?

+I tested it and I think it’s going well Thank you very much.

1 Like