|
|
(2 intermediate revisions by one other user not shown) |
Line 1: |
Line 1: |
− | This page needs to be completed.
| |
− |
| |
| ==HUD Script Commands== | | ==HUD Script Commands== |
| | | |
| Command names are not case sensitive. | | Command names are not case sensitive. |
| | | |
− | {| class="wikitable sortable" id="roundedborder" style="min-width:500px;" | + | {| class="wikitable sortable" style="min-width:500px;" |
| !Command | | !Command |
| !Arguments | | !Arguments |
Line 11: |
Line 9: |
| !Description | | !Description |
| |- | | |- |
− | |setScale || 1 || Scaling method <nowiki>(#DEFAULTSCALE|#NOSCALE|#SCALEBYWIDTH|#SCALEBYHEIGHT)</nowiki> || Sets the scaling method for cursor and size commands. | + | |Command || Arguments || Parameters || Description. |
− | |-
| |
− | |setCursor || 2 || Horizontal position, vertical position || Changes cursor position on the hud parsers virtual grid
| |
− | |-
| |
− | |moveCursor || 2 || horizontal offset, vertical offset || Moves the cursor position relative to current position
| |
− | |-
| |
− | |setAlign || 2 || horizontal alignment <nowiki>(#LEFT|#CENTER|#RIGHT)</nowiki>, vertical alignment <nowiki>(#TOP|#MIDDLE|#BOTTOM)</nowiki> || Changes alignment of things like images or text
| |
− | |-
| |
− | |setSize || 2 || - || Sets width and height. Used in various hud commands for pictures, models and containers
| |
− | |- | |
− | |setFontSize || 1 || - || Sets font size. | |
− | |-
| |
− | |setFontFamily || 1 || Available arguments by default: Droid Sans, Droid Sans Mono, Hemi Head Rg, Kimberley Bl, warsow, Silhouette, Virtue. || Sets font Family.
| |
− | |-
| |
− | |setFontStyle || 1 || <nowiki>Available arguments: Bold, Italic, Normal. Accepts 'con_fontsystemsmall', 'con_fontsystemmedium' and 'con_fontsystembig' as shortcut to default game fonts</nowiki> || Sets font Style.
| |
− | |-
| |
− | |setColor || 4 || - || Sets color setting in RGBA mode. Used to change colors of boxes, bars, text and images
| |
− | |-
| |
− | |setColorToTeamColor || 1 || - || Sets cursor color to the color of the team provided in the argument
| |
− | |-
| |
− | |setColorAlpha || 1 || - || Changes the alpha value of the current color
| |
− | |-
| |
− | |setRotationSpeed || 3 || - || Sets rotation speeds as vector. Used for models
| |
− | |-
| |
− | |setCustomWeaponIcons || 3 || <nowiki>1st argument specifies the weapon it should affect (either by id, or better use #ITEM_GUNBLADE etc constants)</nowiki> <br> <nowiki>2nd argument tells if you want to replace the NOGUN icon (0) or the regular weapon icon (1)</nowiki> <br> <nowiki>3rd argument is the path to the graphic you want to use as a replacement</nowiki> || <nowiki>modifies an individual image on the graphical weaponlist.</nowiki>
| |
− | |-
| |
− | |setCustomWeaponSelect || 1 || the only and required argument is a file path to a valid graphic || modifies the image around current selected weapon on the list of weapons
| |
− | |-
| |
− | |drawObituaries || 2 || - || Draws graphical death messages. Arguments: horizontal alignment, iconsize
| |
− | |-
| |
− | |drawAwards || - || - || Draws award messages
| |
| |- | | |- |
− | |drawClock || - || - || Draws a clock that shows remaining play time
| |
− | |-
| |
− | |drawHelpString || - || - || Draws the help message
| |
− | |-
| |
− | |drawPlayername || 1 || - || Draws the name of the player with id provided by the argument
| |
− | |-
| |
− | |drawPointing || - || - || Draws the name of a player that is being pointed at (the player under the crosshair)
| |
− | |-
| |
− | |drawTeamMates || 0 || - || Draws indicators where team mates are
| |
− | |-
| |
− | |drawStatString || 1 || - || Draws configstring of argument id
| |
− | |-
| |
− | |drawItemName || 1 || - || Draws the name of the thing that is given as argument in form of item index
| |
− | |-
| |
− | |drawString || 1 || - || Draws the text in argument at cursor position using currently set font and color
| |
− | |-
| |
− | |drawStringNum || 1 || - || Can be used to output referenced numbers as text, using currently set font, position and color
| |
− | |-
| |
− | |drawNum || 1 || - || Draws numbers of given character size. Use setSize to set character size
| |
− | |-
| |
− | |drawStretchNum || 1 || - || Draws numbers stretched inside a given size
| |
− | |-
| |
− | |drawBar || 2 || value, maxvalue || Draws a bar of size setting, the bar's longest dimension, or its width if it's a square, is filled in proportion to the arguments
| |
− | |-
| |
− | |drawPicBar || 3 || value, maxvalue, imagefile || Draws an image bar of size setting, is filled in proportion to the arguments.
| |
− | |-
| |
− | |drawCrosshair || - || - || Draws the game crosshair
| |
− | |-
| |
− | |drawKeyState || 1 || <nowiki>forward, backward, left, right, fire, jump, crouch, special. Use setSize to scale and setCursor to position each element.</nowiki> || Draws icons showing if the argument key is pressed.
| |
− | |-
| |
− | |drawNetIcon || - || - || Draws the disconnection icon
| |
− | |-
| |
− | |drawChat || 3 || - || Draws the game chat messages
| |
− | |-
| |
− | |drawPicByIndex || 1 || - || Draws a pic with argument as imageIndex
| |
− | |-
| |
− | |drawPicByItemIndex || 1 || - || Draws a item icon pic with argument as itemIndex
| |
− | |-
| |
− | |drawPicByName || 1 || - || Draws a pic with argument being the file path
| |
− | |-
| |
− | |drawModelByIndex || 1 || - || Draws a model with argument being the modelIndex
| |
− | |-
| |
− | |drawModelByName || 2 || - || Draws a model with argument being the path to the model file
| |
− | |-
| |
− | |drawModelByItemIndex || 1 || - || Draws an item model with argument being the item index
| |
− | |-
| |
− | |drawWeaponIcons || 4 || <nowiki>Offset x, offset y, size x, size y</nowiki> || Draws the icons of weapon/ammo owned by the player
| |
− | |-
| |
− | |drawCaptureAreas || 3 || <nowiki>icon-width, icon-height and alignment (either horizontal or vertical)</nowiki> || Draws capture area HUD icons.
| |
− | |-
| |
− | |drawMiniMap || 2 || <nowiki>Playernames (0|1), itemnames (0|1)</nowiki> || Shows miniature map overview for spectators.
| |
− | |-
| |
− | |drawWeaponWeakAmmo || 3 || <nowiki>Offset x, offset y, fontsize</nowiki> || Draws the amount of weak ammo owned by the player
| |
− | |-
| |
− | |drawWeaponStrongAmmo || 3 || <nowiki>Offset x, offset y, fontsize</nowiki> || Draws the amount of strong ammo owned by the player
| |
− | |-
| |
− | |drawTeamInfo || - || - || Draws the Team Info (locations) box
| |
− | |-
| |
− | |drawTimer || 1 || - || <nowiki>A timer variable or integer.</nowiki> | Draws a digital clock using currently set font.
| |
− | |-
| |
− | |drawPicVar || 6 || <nowiki>value, minval, maxval, firstimg, lastimg, imagename## (replacing ## by the picture number, no leading zeros, starting at 0)</nowiki> || Draws a picture from a sequence, depending on the value of a given parameter.
| |
− | |-
| |
− | |drawLocationName || 1 || <nowiki>location tag/index</nowiki> || Draws the location name
| |
− | |-
| |
− | |if || 1 || <nowiki>Accepts operands >, <, ==, >=, <=, etc.</nowiki> || <nowiki>Conditional expression.</nowiki>
| |
− | |-
| |
− | |endif || - || - || <nowiki>End of conditional expression block</nowiki>
| |
| |} | | |} |
− |
| |
− |
| |
− | add more
| |