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 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Increasing the distance "\n".
Moczulak
General Member
Since: Mar 30, 2009
Posts: 77
Last: Apr 8, 2013
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Thursday, Apr. 4, 2013 11:56 pm
Hey.
I have one question.
I have cvar to the assigned text, text separated by "\n".
But there are a small distance between the lines. It is possible to increase this distance?
I also tried "\n\n", but then there is a large distance...
Share |
Harbinger
General Member
Since: Nov 10, 2007
Posts: 54
Last: Apr 18, 2013
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Apr. 5, 2013 12:04 am
In what context is this being done? Like for a menu?
Share |
Moczulak
General Member
Since: Mar 30, 2009
Posts: 77
Last: Apr 8, 2013
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Apr. 5, 2013 05:20 pm
This script is property of my friend:

Code:
refreshList()
{
	listplayers_name = "";
	listplayers_properties = "";
	
	players = getentarray("player", "classname");
	for(i = 0; i < players.size; i++)
	{
		player = players[i];
		
		player.guid = player getGuid();
		delimname = getamountofchars(player.name, 8);
		
		listplayers_name += delimname + "\n";
		listplayers_properties += player.stat["rank"] + "          " + player.guid + "\n";
	}
	
	self setClientCvar("ui_playername_0", listplayers_name);
	self setClientCvar("ui_playerproperties_0", listplayers_properties);
}


It is very cool and easy to load way list of players to the menu.
I want to use this because it works on only two cvars.

Previously, I wrote a script to load your own players on the list, but each cvar was alone, so if there were 20 players on the server it had to add 20 cvars... [ohwell]

It is better to use the cvar as a whole list of players ... But I have a problem with breaking sentences with "\ n" because they are too small spacing between the lines, I'd like to increase, or is it somehow possible?

edited on Apr. 5, 2013 10:21 am by Moczulak

edited on Apr. 5, 2013 10:23 am by Moczulak
Share |
Ni3ls
General Member
Since: Nov 7, 2008
Posts: 256
Last: Sep 9, 2017
[view latest posts]
Level 5
Category: CoD2 Scripting
Posted: Friday, Apr. 5, 2013 08:54 pm
Make a menu file or a HUD
Share |
Moczulak
General Member
Since: Mar 30, 2009
Posts: 77
Last: Apr 8, 2013
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Apr. 5, 2013 09:36 pm
I made the menu a long time ago, but I mean to edit "\n" to increase the distance between the lines, the text is broken by "\n" and loading in the cvar.
Share |
Harbinger
General Member
Since: Nov 10, 2007
Posts: 54
Last: Apr 18, 2013
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Apr. 5, 2013 10:52 pm
Try adding \r after the \n. It works for somethings, this might be one of those cases.
Share |
Moczulak
General Member
Since: Mar 30, 2009
Posts: 77
Last: Apr 8, 2013
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Monday, Apr. 8, 2013 11:34 am
Hey \r not work... ;(
Share |
Harbinger
General Member
Since: Nov 10, 2007
Posts: 54
Last: Apr 18, 2013
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Monday, Apr. 8, 2013 02:38 pm
I just noticed you edited in the script. There is no direct way through scripting to change the space. However, there may be a way to change the menu so that it gives you more space between lines. If you check the .iwi files that come with the game, there should be a file in the ui folder that is something like menudef.h. I would check myself but I do not have access to cod 2 at the moment. There is a bunch of menu options in there. If you play with them, it may get you what you want. The only other option is to have a bunch of client cvars and having a place for each client cvar on the menu.
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

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

»