Results 1 to 5 of 5
  1. #1
    Forum Supervisor HigH_HawK's Avatar
    Join Date
    2006-03-15
    Location
    Leipzig
    Posts
    767
    BFBC2 PC
    HigH_HawK
    NFS World
    HIGHHAWK
    BF3 PC
    HigH_HawK
    Gamer IDs

    XFIRE ID: lon3swolf Steam ID: lones_wolf

    Code Documentation "short version"

    Here a short documentation, to make you more comfortable with some functions.


    Variables:

    Variables are containers, where you are able to store data, which can be used afterwards. Variable names follow the same rules as other labels in PHP. A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. A variable must not start with a number!!!

    Example:
    • Number: var=21;
    • Text: var="Hello World";
    • Hex-Colourcode: var="000000"; this will change the colour of the text to "black"

    If you are using the command (e.g. "text()";), the variable must not have a number on the end!

    Default-Variables
    With these variables you define standard settings (Textcolor, Font, etc.) for the graphic.
    The following variables ar available:
    • defaults.color"Textcolour"
    • defaults.font "Font"
    • defaults.bgcolor "Background colour"
    • defaults.align "Alignment (left, center, right)"
    • defaults.size "Font size in Pixel"
    • defaults.angle "Angle (45 corresponds to 45°, rotation goes counter-clockwise)"



    Operators

    "+" for Addition
    "-" for Subtraktion
    "*" for Multiplication
    "/" for Division
    "<" for Less than
    ">" for Greater than
    "<=" for Less than or equal to
    ">=" for Greater than or equal to
    "&&" for And
    "||" for Or


    Commands:

    rectangle();
    This command creates a rectangle. The following parameters are available:
    • x: Distance on the x-axis
    • y: Distance on the y-axis
    • w: Width
    • h: Height
    • fill: Background colour
    • color: Border colour

    You can either use "fill" or "color". (Both options are unable to work together)
    Example: rectangle(x:20, y:50, w:100, h:40, fill:"ffffff");

    text()
    This command is printing a text. The following commands are available:
    • x: Distance on the x-axis
    • y: Distance on the y-axis
    • color: Text colour
    • size: Font size (in Pixel)
    • font: Font
    • align: Alignment (left, center, right)
    • angle: Angle (45 corresponds to 45°, rotation goes counter-clockwise)
    • text: This will be the text you want to print on your graphic

    Example: text(x:80, y: 25, color:"000000", size:"12", font:"Vera", align:"center", angle:45, text:"Here you have the example");

    image()
    This command is showing an image. The following commands are available:

    You can choose a specific part of your image to use this part as the background. ("sx", "sy", "sw" and "sh").
    • x: Distance on the x-axis
    • y: Distance on the y-axis
    • w: Width
    • h: Height
    • sx: Distance on the x-axis on the graphic
    • sy: Distance on the y-axis on the graphic
    • sw: Width of the graphic
    • sh: Height of the graphic
    • ownerid: ID of the registered user - This ID must be entered
    • file: Filename of the uploaded graphic
    • noresample Anti-Aliasing (1=on)

    Example: image(file:"image_file.png", x:"0", y:"0", w:"468", h:"100", sx:"468", sy:"0", sw:"468", sh:"100", ownerid:"3", noresample:"1");

    progress()
    This command is necessary to show a progress bar in your signature. The following commands are available:
    • type: Type (rank)
    • curr: Current Score (e.g. "p.score")
    • start: Initial Value
    • next: Final Value
    • w: Total width in Pixel

    The parameters"start" and "next" are optional and should only be used when you have not defined "type".
    Example: progress(type:"rank", curr:"p.score", w:"100");

    transbg()
    This command displays a transparent background. The following parameters are available:
    • color: Background-Colour

    The colour must be entered with the Alphachannel (0=100% to 127=0%).

    Example:
    transbg(); makes a transparent background
    transbg(color:"000000-63"); displays a black background which is half (50%) transparent


    Functions:

    concat()
    This function is connecting different elements.
    Example: concat(4,"%"); displays: 4%

    nf()
    Format a number with grouped thousands (e.g. 120 000). Additionally you can show the decimals.
    Example: nf(0.245632, 2); displays: 0.25

    To prevent any errors, you should not do any calculations with formated numbers.

    Example:
    nf(0.245632*100, 2); True - displays: 24.56
    nf(0.245632, 2)*100; False

    cc()
    see concat()

    round()
    Rounds a float.
    Example:
    round(1.2759, 2); displays: 1.28
    round(1254328, -3); displays: 1254000

    time()
    This function returns the time from a UNIX timestamp.
    Example: time(26494); display: 07h 21m 34s

    thetime()
    With this function you can do the same as with time(), however you can specify the output. You can use d(days), h(hours), i(minutes), s(seconds)
    Example: thetime(26494, "h:i"); displays: 07:21

    img_rank()
    This function displays the rank image.
    Example: image(file:img_rank(p.rank), x:60, y:20, w:60, h:60); - the owner ID is not necessary

    img_rank_tiny()
    This function displays the tiny rank image.
    Example: image(file:img_rank_tiny(p.rank), x:60, y:20, w:16, h:16); - the owner ID is not necessary
    Last edited by HigH_HawK; 2011-10-28 at 14:30.

  2. #2
    Answerer RSAsterix's Avatar
    Join Date
    2011-09-05
    Location
    The Netherlands
    Posts
    98
    BFBC2 PC
    RSAsterix
    BF3 PC
    RSAsterix
    Gamer IDs

    Steam ID: RSAsterix

    Re: Code Documentation "short version"

    You can also make ANY color you want in paint, and the readings for "red", "green" and "blue" will make up the ###### number.
    The color number uses a hexadecimal system, which works kinda like this:

    numbers 0 till 15:
    00, 01, 02, 03, ... 09, 0A (10), 0B (11), 0C (12), 0D (13), 0E (14), 0F (15)
    numbers from 16:
    10 (16: the 1 stands for 1x16, the 0 for... well 0), 11 (1x16 + 1x1 = 17), 12 (1x16 + 2x1 = 18) and so on till 1F (1x16 + 15x1 = 31)
    and then:
    20 (2x16 + 0x1 = 32) and so on.

    Now you understand the hexadecimal system for a bit, you can enter any red,green,blue value into the color code using this format:
    rr,gg,bb
    Yellow, for example, has red=255, green=255, blue=0, so as a color code that would be:
    #FFFF00

    Now you can make any of the 16777216 colors you want! Enjoy!

  3. #3

    Re: Code Documentation "short version"

    Merry Christmas !
    but
    help me guys, how can i have in my graphic nemesis dogtags?
    its very important

    thank you

  4. #4
    Administrator 1ApRiL's Avatar
    Join Date
    2011-02-12
    Location
    Waiblingen, Germany
    Posts
    576
    BFBC2 PC
    1ApRiL
    NFS World
    1APRIL
    BF2
    1ApRiL
    BF3 PC
    1ApRiL
    Gamer IDs

    XFIRE ID: 1april

    Re: Code Documentation "short version"

    Quote Originally Posted by nino:nino View Post
    Merry Christmas !
    but
    help me guys, how can i have in my graphic nemesis dogtags?
    its very important

    thank you
    Sorry, but that is not possible.
    Admin of bf3stats.com / bfbcs.com / nfs-s.com / mohstats.com / crystats.com | Twitter


  5. #5

    Re: Code Documentation "short version"

    nooo
    do i have to be a noob and insert a text ?
    ....

    Merry Christmas !
    and thx

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
P-STATS NETWORK FORUM LOGIN CREATE ACCOUNT