Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 51 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty
Category: CoD+UO General
General game questions, comments, and chat.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: string in hudelem
vinhui
General Member
Since: Apr 9, 2009
Posts: 66
Last: Jun 27, 2011
[view latest posts]
Level 3
Category: CoD+UO General
Posted: Sunday, Apr. 24, 2011 03:13 pm
hi,

i want to put a string in a hud element, now i got the following:
http://codepad.org/rcz8qdTh

but it is verry long and i hoped i could do it by a shorter way.

I know i can precache a string and also put it into a hud but i cant do it with a player name or something
Share |
oppdelta
General Member
Since: Jun 3, 2007
Posts: 143
Last: Apr 27, 2011
[view latest posts]
Level 4
Category: CoD+UO General
Posted: Sunday, Apr. 24, 2011 03:53 pm
hud setValue(player.name);

If I remember correctly.



Nope. Not that.
edited on Apr. 24, 2011 12:43 pm by oppdelta
Share |
vinhui
General Member
Since: Apr 9, 2009
Posts: 66
Last: Jun 27, 2011
[view latest posts]
Level 3
Category: CoD+UO General
Posted: Sunday, Apr. 24, 2011 04:50 pm
nope, that only takes floats
Share |
pgfabio
General Member
Since: Apr 19, 2011
Posts: 11
Last: Jan 20, 2012
[view latest posts]
Level 1
Category: CoD+UO General
Posted: Sunday, Apr. 24, 2011 04:58 pm
what do u want to do exactly? pls explain me
Share |
vinhui
General Member
Since: Apr 9, 2009
Posts: 66
Last: Jun 27, 2011
[view latest posts]
Level 3
Category: CoD+UO General
Posted: Sunday, Apr. 24, 2011 06:07 pm
i want to make a mini leader board including the names
Share |
serthy
General Member
Since: Sep 8, 2010
Posts: 482
Last: Jun 28, 2013
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD+UO General
Posted: Sunday, Apr. 24, 2011 08:38 pm
u can do it with
a) Hud
b) menu

if u wanna use the hud method, like u did, u see u have to precache every string
but it is serverside only, so no client download

if u wanna use the menu method, u have to create a lil custom menu, which the clients have to download
in the menu u simply show your text/number by cvar
Share |
Japie19
General Member
Since: Apr 24, 2011
Posts: 1
Last: Apr 24, 2011
[view latest posts]
Level 0
Category: CoD+UO General
Posted: Sunday, Apr. 24, 2011 10:15 pm
A small question. In your code, you use a huge if row. Isnt it easier to use switch - case?
Share |
.KiLL3R.
General Member
Since: Oct 26, 2006
Posts: 1437
Last: Jul 3, 2017
[view latest posts]
Level 8
Category: CoD+UO General
Posted: Monday, Apr. 25, 2011 12:11 pm
You'll run into problems with hudelems, it will only display up to a max of 32, some of which are already used so that that knocks it down to around 24.

24 characters isn't going to be enough so you'll have to do it using menus.
Share |
vinhui
General Member
Since: Apr 9, 2009
Posts: 66
Last: Jun 27, 2011
[view latest posts]
Level 3
Category: CoD+UO General
Posted: Monday, Apr. 25, 2011 02:18 pm
i know it can be done easyer but i dont know how to do it

perhaps i could use a switch indeed but i didnt :)

but with the menus, will that give the same result as the huds? (im not the familiar with menus)
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty : CoD+UO General

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»