Post: Number alternative to setText
01-17-2012, 09:12 PM #1
d7w7z
Bounty hunter
(adsbygoogle = window.adsbygoogle || []).push({}); If you guys don't know, there is a number version of setText that displays only numbers but doesn't crash the game.

    
M = self createFontString( "hudbig", 0.8 );
M setPoint( "CENTER", "TOP", 0, 10 );
M setValue( 150 );


Also bonus stuffz I found when I was bored. Could be helpful to some people, so just gonna post because I havent seen anyone use any of this stuff.

You may need to add this to your gsc file for some of them to work.
    
#include maps\mp\gametypes\_hud_util;



Timer (seconds)
    
//Whole server
level.myTimer = createServerTimer( "objective", 1.4 );
level.myTimer.label = "Timer Test";
level.myTimer setTimer( 8 );

or

//Single person
level.myTimer = createTimer( "objective", 1.4 );
level.myTimer.label = "Timer Test";
level.myTimer setTimer( 8 );


Timer used for killcams (4.6 seconds ect)
    
self.kc_timer = createFontString( "hudbig", 1.0 );
self.kc_timer.x = 0;
self.kc_timer.y = 42;
self.kc_timer.color = (1,1,1);
self.kc_timer setTenthsTimer(camtime);


Server-wide text ( for doHearts ect)
    
t = createServerFontString("hudbig", 1.0);
t setPoint( "CENTER", "TOP", 0, 10 );
t setText( "Herp" );

or for a certain team

newtext = createServerFontString("hudbig", 1.0, [B]"axis"[/B]);


Easiest way to make an icon
    
myIcon = createIcon( shader, width, height );
myIcon.x=0;
myIcon.y=0;


MW2 Main Menu shaders ( not sure if they work on Cod4, but I think they will)
    
precacheShader( "menu_button" );
precacheShader( "menu_button_selected" );
precacheShader( "menu_button_fade" );
precacheShader( "menu_button_fade_selected" );
precacheShader( "menu_button_faderight" );
precacheShader( "menu_button_faderight_selected" );
precacheShader( "menu_caret_open" );
precacheShader( "menu_caret_closed" );


IW's way of displaying names (FFA winners ect)
    
secondTitle = createFontString( font, fontScale );
secondTitle setPoint( "TOP", "BOTTOM", 0, 150 );
secondTitle.glowColor = (0.2, 0.3, 0.7);
secondTitle.glowAlpha = 1;
secondTitle setPlayerNameString( self );

(adsbygoogle = window.adsbygoogle || []).push({});

The following 5 users say thank you to d7w7z for this useful post:

247Yamato, IVI40A3Fusionz, Kush Friendly, Uk_ViiPeR

The following user groaned d7w7z for this awful post:

IELIITEMODZX
01-18-2012, 06:41 PM #11
IVI40A3Fusionz
Former Gaming Squad Member
I've known about setValue for a good few weeks thanks to Elite ^^.

EDIT: Good post though will help a few people Winky Winky.
01-18-2012, 08:16 PM #12
SnipeNshot
Do a barrel roll!
thanks so this goes in the weapons.gsc right

---------- Post added at 03:16 PM ---------- Previous post was at 02:37 PM ----------

quick question Again, if i wanted to have a host only bind for radar where would i put it? as well as for lean left and lean right

but lean left and right for everybody and radar bind only for me?

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo