• 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial Custom gametype HUD
#11
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.
Would like to make a donation? Click here
  Reply
#12
(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" ) )
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

[-] The following 2 users say Thank You to iAegle for this post:
  • Cyborgking, d0h!
  Reply
#13
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

==================================================
Black Ops Mods:

RPG(rocket launcher) mod
Get the Specials

Old aliasses:

eliteCVDelite
CVD

  Reply
#14
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)
Black Ops Mods:

RPG(rocket launcher) mod
Get the Specials

Old aliasses:

eliteCVDelite
CVD

  Reply
#15
self setClientDvar( "ui_zom_allies_alive", "Survivors left: " + level.alivePlayers[ "allies" ].size );
Where to paste it?
  Reply
#16
Probably on a thread?
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
  Reply
#17
I don't know. Where and in what file paste it?
self setClientDvar( "ui_zom_allies_alive", "Survivors left: " + level.alivePlayers[ "allies" ].size );
  Reply
#18
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.
C++/Obj-C developer. Neko engine wip
Steam: Click
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Black Ops 2 Custom background? jotape99 10 6,118 10-29-2013, 07:22
Last Post: xInfinity.
  Custom xanims DidUknowiPwn 8 3,413 08-28-2013, 08:17
Last Post: RaZ
  Help Make ac130 shoot custom bullets Ra3shed 0 1,270 07-23-2013, 13:02
Last Post: Ra3shed
Wink [Release] Shop system for Infected gametype Nekochan 125 37,528 07-05-2013, 18:09
Last Post: mohammadnanaa
Video Custom Facepaints? Cuddlyedits 5 1,790 07-01-2013, 14:58
Last Post: iPaddie
  Help dedicated servers and custom dvars mattyman 0 1,240 06-22-2013, 07:33
Last Post: mattyman
Information [Tutorial] Adding DLC Maps as Custom Maps. Nekochan 151 59,253 05-25-2013, 01:05
Last Post: Nero Z zero
  QS Mod by GeKKo v 6.5 with Custom Maps GeKKoFL0X 35 18,526 05-21-2013, 19:30
Last Post: [HARD] Tony.
  [Request] custom gun mod ColorCorrects 2 1,586 05-18-2013, 22:19
Last Post: mitchhacker
  Help Gametype WAR FaiR_PLaY 1 883 05-07-2013, 20:40
Last Post: DidUknowiPwn

Forum Jump:


Users browsing this thread: 1 Guest(s)