11-09-2011, 23:29
Pages: 1 2
11-14-2011, 17:08
(11-09-2011, 23:29)Cyborgking Wrote: [ -> ]Could you explain a bit more how you made: Survivors left: 1? I know you have done something with a client dvar but that's it.
Yeah sure
here's the itemDef, it gets the text from a dvar
Code:
itemDef
{
type ITEM_TYPE_TEXT
rect (BAR_START_X+FACTION_BG_WIDTH/2) -22 1 BAR_HEIGHT_TOP WAGER_SUMMARY_ALIGN
dvar "ui_zom_allies_alive"
textstyle ITEM_TEXTSTYLE_SHADOWED
textalign ITEM_ALIGN_MIDDLE_LEFT
textfont UI_FONT_EXTRABIG
textscale TEXTSIZE_LARGE
forecolor 1 1 1 0.65
visible 1
decoration
}
this itemDef will get its text from a dvar "ui_zom_allies_alive", I set the dvar with a GSC script
Code:
self setClientDvar( "ui_zom_allies_alive", "Survivors left: " + level.alivePlayers[ "allies" ].size );
.. thats it
another way of doing this could be with:
Code:
text ( dvarString( "ui_zom_allies_alive" ) )
03-29-2012, 13:19
and the $ ?
UNRECOVERABLE ERROR:
duplicate menu name 'mod_gamemessages'
Linker will now terminate.
********************************************************************************
==================================================
Linker summary:
There were 0 warnings and 3 errors.
Errors:
Menu load error: ui_mp/hud_tdm.menu, line 117: unknown menu item keyword \
Menu load error: ui_mp/hud_tdm.menu, line 117: unknown menu item keyword \
(!) UNRECOVERABLE ERROR: duplicate menu name 'mod_gamemessages'
Arguments passed to linker:
-nopause -language english -moddir mp_modname mod
==================================================
UNRECOVERABLE ERROR:
duplicate menu name 'mod_gamemessages'
Linker will now terminate.
********************************************************************************
==================================================
Linker summary:
There were 0 warnings and 3 errors.
Errors:
Menu load error: ui_mp/hud_tdm.menu, line 117: unknown menu item keyword \
Menu load error: ui_mp/hud_tdm.menu, line 117: unknown menu item keyword \
(!) UNRECOVERABLE ERROR: duplicate menu name 'mod_gamemessages'
Arguments passed to linker:
-nopause -language english -moddir mp_modname mod
==================================================
03-30-2012, 13:51
ahh i see what the problem is..... can you make it alse ready for my point system with: self.bounty and delete all the zombie stuff?
(upper = bounty lower = score overal like tdm:7400 @pic)
(upper = bounty lower = score overal like tdm:7400 @pic)
07-13-2013, 20:58
self setClientDvar( "ui_zom_allies_alive", "Survivors left: " + level.alivePlayers[ "allies" ].size );
Where to paste it?
Where to paste it?
07-13-2013, 21:25
Probably on a thread?
07-13-2013, 21:28
I don't know. Where and in what file paste it?
self setClientDvar( "ui_zom_allies_alive", "Survivors left: " + level.alivePlayers[ "allies" ].size );
self setClientDvar( "ui_zom_allies_alive", "Survivors left: " + level.alivePlayers[ "allies" ].size );
07-14-2013, 01:16
You need to make function which detects any death or kill... Or just make loop. It is all in GSC scripts.
As first try, you can paste it in file called _rank.gsc, find line 'self waittill("spawned_player");' and paste your code. I'd recommend you to learn modding and gsc basics first if you don't understand. Good luck!
Sorry can't post my code there since I am @ipod.
As first try, you can paste it in file called _rank.gsc, find line 'self waittill("spawned_player");' and paste your code. I'd recommend you to learn modding and gsc basics first if you don't understand. Good luck!
Sorry can't post my code there since I am @ipod.
Pages: 1 2