Advertisement
Guest User

hud

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