Advertisement
Guest User

hud

a guest
Apr 27th, 2014
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.68 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5. // Gametypes: g_gametype: 0 = FFA, 1 = Duel, 2 = Single Player (not usable), 3 = TDM, 4 = CA, 5 = CTF, 6 = One-Flag CTF = 7
  6. // Overload (not complete), 8 = Harvester, 9 = Freeze Tag, 10 = Domination, 11 = Attack & Defend, 12 = Red Rover
  7. // elementcolor: text=backcolor paint=forecolor
  8. // background "gfx/2d/crosshair14.tga" style 1 backcolor 0 0 0 1 visible 1
  9.  
  10.  
  11. #include "ui/menudef.h"
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21. /// HEALTH VALUE
  22.  
  23. menuDef { fullScreen MENU_FALSE visible MENU_TRUE rect 0 3 0 0
  24.  
  25. itemDef { ownerdraw CG_PLAYER_HEALTH visible 1 textstyle 6 textscale 0.9
  26. addColorRange -999 0 0 0 0 0
  27. addColorRange 1 40 1 0.02 0 1
  28. addColorRange 41 80 0.9 0.02 0 1
  29. addColorRange 81 100 1 0.8 0 1
  30.  
  31. addColorRange 101 299 0.25 0.25 0.25 1 // 0.5 0.5 0.5 1
  32. addColorRange 300 999 0.25 0.25 0.25 1 // 0 0 0 0.7 //
  33. rect 320 471 0 0
  34. }
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43. /// ARMOR VALUE
  44.  
  45. itemDef { ownerdraw CG_PLAYER_ARMOR_VALUE visible 1 textstyle 6 textalign 0 textscale 0.5
  46. addColorRange -999 0 0 0 0 0
  47. addColorRange 1 50 1 0.02 0 1
  48. addColorRange 51 999 1 0.8 0 1
  49. rect 415 471 0 0
  50.  
  51. cvartest "g_gametype" showcvar { 0 1 3 9 }
  52. }
  53. }
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61. // WARMUP
  62.  
  63. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  64. itemDef { visible 1 textstyle 2
  65. text "~" textscale 1
  66. ownerdrawflag CG_SHOW_IF_WARMUP
  67. rect 4 95 0 0
  68. }
  69. }
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78. /// OBITS
  79.  
  80. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  81.  
  82. itemdef {
  83. /// rect 470 473 20 400
  84. rect 400 60 20 400
  85. textscale .3
  86. textalign ITEM_ALIGN_CENTER ownerdraw CG_PLAYER_OBIT visible 1 style 1
  87. }
  88.  
  89. }
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99. /// CHAT AREA
  100.  
  101. menuDef { fullScreen MENU_FALSE visible MENU_TRUE rect 10 400 50 100 // rect here!
  102.  
  103. itemDef {
  104. rect -10 -400 640 480 visible 1 style 1
  105. ownerdrawflag CG_SHOW_IF_CHAT_VISIBLE
  106. backcolor 0 0 0 0.75 }
  107.  
  108. itemdef { ownerdraw CG_AREA_NEW_CHAT textscale 1 visible 1 }
  109. }
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119. /// TIMER CLOCK
  120.  
  121. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  122.  
  123.  
  124. itemDef { visible 1 style WINDOW_STYLE_TEAMCOLOR // BACKGROUND
  125. // rect 0 0 640 32
  126.  
  127. cvartest "g_gametype" showcvar { 0 3 4 9 10 }
  128. }
  129.  
  130.  
  131. itemDef {
  132. rect 220 27 0 0 // CLOCK
  133. visible 1 textstyle 2 forecolor 1 1 1 1
  134. textscale 0.666 ownerdraw CG_LEVELTIMER textalign 0
  135. }
  136. }
  137.  
  138.  
  139.  
  140. /// ROUND COUNTDOWN 30s
  141.  
  142. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  143.  
  144. /// ROUND TIMER -30sec-
  145. itemDef {
  146. rect 240 60 0 0
  147. visible 1 textscale .3 textalign 0
  148. ownerdraw CG_ROUNDTIMER textstyle 3 style 1 }
  149. }
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159. /// POWERUP QUAD + BATTLESUIT
  160.  
  161. menuDef { fullScreen MENU_FALSE visible MENU_TRUE rect 550 250 0 0 // 15 425 0 0 //
  162. itemDef { visible 1 ownerdraw CG_AREA_POWERUP
  163. rect -10 0 50 40
  164. textscale .8 }
  165. }
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175. /// PICKUPS TELEPORT + KAMI
  176.  
  177. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  178. rect 600 400 1 1
  179. itemDef { name "playeritem" visible 1 ownerdraw CG_PLAYER_ITEM rect 0 0 27 27 }
  180. itemDef { name "CTFPOWERUP" visible 1 ownerdraw CG_CTF_POWERUP rect 0 40 27 27 }
  181. }
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190. // SKILLRATING
  191.  
  192. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  193.  
  194. // rect 600 150 0 0
  195. rect 576 388 0 0
  196.  
  197. itemDef { visible 1 textstyle 0
  198. textscale 0.3 forecolor 1 1 1 1
  199. cvar "sv_skillrating"
  200. cvartest "ybl_skill" showcvar { 1 }
  201. }
  202.  
  203. }
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216. // BACKGROUND ( FFA )
  217.  
  218. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  219. rect 0 2 0 0
  220.  
  221. itemDef { visible 1 style 1 backcolor .23 .23 .23 1
  222. rect 0 2 153 16 cvartest "g_gametype" showcvar { 0 1 12 }
  223. }
  224.  
  225. itemDef { visible 1 style 1 backcolor .23 .23 .23 1
  226. rect 0 22 153 16 cvartest "g_gametype" showcvar { 0 1 12 }
  227. }
  228. }
  229.  
  230.  
  231.  
  232. /// SCOREBOARD SELF HIGHLIGHT ( FFA )
  233.  
  234.  
  235.  
  236. menuDef {
  237. name "SelfFrameHighlights"
  238. fullScreen MENU_FALSE
  239. visible MENU_TRUE
  240.  
  241. rect 0 2 0 0
  242.  
  243. itemDef {
  244. cvartest "g_gametype" showcvar { 0 1 12 }
  245. name "SelfTLeft"
  246. rect 0 2 153 16
  247. visible 1
  248. backcolor .6 .6 .6 1
  249. style WINDOW_STYLE_FILLED
  250. ownerdrawflag CG_SHOW_IF_PLYR_IS_FIRST_PLACE
  251.  
  252. }
  253.  
  254. itemDef {
  255. cvartest "g_gametype" showcvar { 0 1 12 }
  256. name "SelfTLeft"
  257. rect 0 22 153 16
  258. visible 1
  259. ownerdrawflag CG_SHOW_IF_PLYR_IS_NOT_FIRST_PLACE
  260. backcolor .6 .6 .6 1
  261. style WINDOW_STYLE_FILLED
  262. }
  263. }
  264.  
  265.  
  266.  
  267.  
  268. // BACKGROUND SHADOW 4 SCORES ( FFA )
  269.  
  270. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  271. rect 0 2 0 0
  272.  
  273. itemDef { visible 1 style 1 backcolor 0 0 0 .3 // frags
  274. rect 123 2 30 16 cvartest "g_gametype" showcvar { 0 1 12 }
  275. }
  276. itemDef { visible 1 style 1 backcolor 0 0 0 .3 // frags
  277. rect 123 22 30 16 cvartest "g_gametype" showcvar { 0 1 12 }
  278. }
  279.  
  280. itemDef { visible 1 style 1 backcolor 0 0 0 .3 // score
  281. rect 0 2 20 16 cvartest "g_gametype" showcvar { 0 1 12 }
  282. }
  283. itemDef { visible 1 style 1 backcolor 0 0 0 .3 // score
  284. rect 0 22 20 16 cvartest "g_gametype" showcvar { 0 1 12 }
  285. }
  286. }
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295. // SCOREBOARD VALUE ( FFA )
  296.  
  297.  
  298. menuDef {
  299. name "scores"
  300. fullScreen MENU_FALSE
  301. visible MENU_TRUE
  302. rect -3 2 0 0
  303.  
  304. itemDef {
  305. name "1stplace"
  306. ownerdraw CG_1ST_PLACE_SCORE
  307. rect 10 14 140 40
  308. visible 1 cvartest "g_gametype" showcvar { 0 1 12 }
  309. textscale .24 textstyle 3
  310. }
  311.  
  312.  
  313. itemdef {
  314.  
  315. name "2ndplace"
  316. ownerdraw CG_2ND_PLACE_SCORE
  317. rect 10 34 140 40
  318. visible 1 cvartest "g_gametype" showcvar { 0 1 12 }
  319. textscale .24 textstyle 3
  320. }
  321. }
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. /// PLAYER COUNTER /// ( TEAM )
  335.  
  336.  
  337. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  338. rect 15 474 0 0
  339.  
  340.  
  341. // HOME
  342.  
  343. itemdef { textstyle 2 visible 1 ownerdraw CG_RED_CLAN_PLYRS ownerdrawflag CG_SHOW_IF_PLYR_IS_ON_RED
  344. forecolor 1 1 1 1 textscale .45 cvartest "g_gametype" showcvar { 4 9 } }
  345.  
  346. itemdef { textstyle 2 visible 1 ownerdraw CG_BLUE_CLAN_PLYRS ownerdrawflag CG_SHOW_IF_PLYR_IS_ON_BLUE
  347. forecolor 1 1 1 1 textscale .45 cvartest "g_gametype" showcvar { 4 9 } }
  348. }
  349.  
  350. // GUEST
  351.  
  352. menuDef { fullScreen MENU_FALSE visible MENU_TRUE
  353. rect 45 474 0 0
  354.  
  355. itemdef { visible 1 textstyle 2 ownerdraw CG_BLUE_CLAN_PLYRS ownerdrawflag CG_SHOW_IF_PLYR_IS_ON_RED
  356. forecolor 1 1 1 1 textscale .45 cvartest "g_gametype" showcvar { 4 9 } }
  357.  
  358. itemdef {
  359. visible 1 textstyle 2 ownerdraw CG_RED_CLAN_PLYRS ownerdrawflag CG_SHOW_IF_PLYR_IS_ON_BLUE
  360. forecolor 1 1 1 1 textscale .45 cvartest "g_gametype" showcvar { 4 9 } }
  361. }
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376. /// SCOREBOARD BACKGROUND ( TEAM )
  377.  
  378.  
  379.  
  380. menuDef {
  381. name "SelfFrameHighlights"
  382. fullScreen MENU_FALSE
  383. visible MENU_TRUE
  384.  
  385. rect 2 2 0 0
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394. itemDef { //// MY TEAM SHADOW (TEAMCOLOR)
  395. name "SelfTLeft"
  396. rect 4 22 25 2
  397. visible 1
  398. cvartest "g_gametype" showcvar { 3 4 9 10 }
  399. ownerdrawflag CG_SHOW_IF_PLYR_IS_FIRST_PLACE
  400. style WINDOW_STYLE_TEAMCOLOR
  401.  
  402. }
  403.  
  404. itemDef { //// MY TEAM SHADOW (TEAMCOLOR)
  405. name "SelfBLeft"
  406. rect 29 4 25 20
  407. visible 1
  408. cvartest "g_gametype" showcvar { 3 4 9 10 }
  409. ownerdrawflag CG_SHOW_IF_PLYR_IS_NOT_FIRST_PLACE
  410. style WINDOW_STYLE_TEAMCOLOR
  411. }
  412.  
  413. itemDef { //// ENEMY TEAM SHADOW
  414. name "SelfBLeft"
  415. rect 4 4 25 20
  416. visible 1
  417. cvartest "g_gametype" showcvar { 3 4 9 10 }
  418. ownerdrawflag CG_SHOW_IF_PLYR_IS_NOT_FIRST_PLACE
  419. style WINDOW_STYLE_FILLED backcolor 0 0 0 .3
  420. }
  421.  
  422. itemDef { //// ENEMY TEAM SHADOW
  423. name "SelfBLeft"
  424. rect 29 4 25 20
  425. visible 1
  426. cvartest "g_gametype" showcvar { 3 4 9 10 }
  427. ownerdrawflag CG_SHOW_IF_PLYR_IS_FIRST_PLACE
  428. style WINDOW_STYLE_FILLED backcolor 0 0 0 .3
  429. }
  430.  
  431.  
  432.  
  433.  
  434.  
  435. itemDef { /// BOX (ENEMY TEAM)
  436. name "SelfBLeft"
  437. rect 2 2 25 20
  438. visible 1
  439. cvartest "g_gametype" showcvar { 3 4 9 10 }
  440. backcolor 0 0 0 1
  441. style WINDOW_STYLE_FILLED
  442. }
  443. itemDef { /// BOX (ENEMY TEAM)
  444. name "SelfBLeft"
  445. rect 27 2 25 20
  446. visible 1
  447. cvartest "g_gametype" showcvar { 3 4 9 10 }
  448. backcolor 0 0 0 1
  449. style WINDOW_STYLE_FILLED
  450. }
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457. //// MY TEAM BOX (TEAMCOLOR)
  458.  
  459. itemDef {
  460. name "SelfTLeft"
  461. rect 2 2 25 20
  462. visible 1
  463. cvartest "g_gametype" showcvar { 3 4 9 10 }
  464. ownerdrawflag CG_SHOW_IF_PLYR_IS_FIRST_PLACE
  465. style WINDOW_STYLE_FILLED
  466. ownerdraw CG_TEAM_COLOR
  467.  
  468. }
  469.  
  470. itemDef {
  471. name "SelfBLeft"
  472. rect 27 2 25 20
  473. visible 1
  474. cvartest "g_gametype" showcvar { 3 4 9 10 }
  475. ownerdrawflag CG_SHOW_IF_PLYR_IS_NOT_FIRST_PLACE
  476. style 1
  477. ownerdraw CG_TEAM_COLOR
  478. }
  479.  
  480.  
  481. }
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495. /// SCOREBOARD VALUE ( TEAM )
  496.  
  497.  
  498. menuDef {
  499. name "scores"
  500. fullScreen MENU_FALSE
  501. visible MENU_TRUE
  502.  
  503. rect -12 3 0 0
  504.  
  505. itemdef { // 1STPLACE VALUE
  506.  
  507. ownerdraw CG_1ST_PLACE_SCORE
  508. rect -130 15 165 0
  509. cvartest "g_gametype" showcvar { 3 4 9 10 }
  510. visible 1 textstyle 3
  511. textscale .2
  512.  
  513. }
  514. itemdef { // 2ND PLACE VALUE
  515. name "2ndplace"
  516. ownerdraw CG_2ND_PLACE_SCORE
  517. rect -130 15 190 0
  518. cvartest "g_gametype" showcvar { 3 4 9 10 }
  519. visible 1 textstyle 3
  520. textscale .2
  521.  
  522. }
  523.  
  524. }
  525.  
  526.  
  527.  
  528.  
  529.  
  530. //////// end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement