Jump to content

Script Font Problem


Tomaat

Recommended Posts

Hey everyone,

I have gotten a problem with my scipt, it wont load a text because of the font i use

heres what i put in thescrip:

local drawFont = dxCreateFont("draw.ttf", 
local drawFontCity = dxCreateFont("draw.ttf", 25) 

    dxDrawText(lastCity, 1, scy-100+1, scx+1, scy-100+1, tocolor(0, 0, 0, cityDrawAlpha), 1, drawFontCity, "center", "top", false, false, true) 
    dxDrawText(lastCity, 0, scy-100, scx, scy-100, tocolor(255, 255, 255, cityDrawAlpha), 1, drawFontCity, "center", "top", false, false, true) 

The error in /debugscript 3 is: Expected dx-font at argument 8, got nil

whats wrong..?

i did not make this script :S just please fix it, i think its creating a bit of lagg

If its going to be an server default font its fine too, i need the font from the VehicleName when you enter one

then please edit code#2 so i can put it in right away

Regards, Tomaat

Link to comment

Of course it is, here's a list of all valid fonts:

"default": Tahoma

"default-bold": Tahoma Bold

"clear": Verdana

"arial": Arial

"sans": Microsoft Sans Serif

"pricedown": Pricedown (GTA's theme text)

"bankgothic": Bank Gothic Medium

"diploma": Diploma Regular

"beckett": Beckett Regular

Link to comment
Of course it is, here's a list of all valid fonts:
"default": Tahoma

"default-bold": Tahoma Bold

"clear": Verdana

"arial": Arial

"sans": Microsoft Sans Serif

"pricedown": Pricedown (GTA's theme text)

"bankgothic": Bank Gothic Medium

"diploma": Diploma Regular

"beckett": Beckett Regular

So how would it be ?

i want it to be the pricedown

will it be like :

local drawFont = dxCreateFont("pricedown", 

or a whole change ?

Link to comment

dxCreateFont is only used to CREATE fonts, not to use current ones.

    dxDrawText(lastCity, 1, scy-100+1, scx+1, scy-100+1, tocolor(0, 0, 0, cityDrawAlpha), 1, "pricedown", "center", "top", false, false, true) 
    dxDrawText(lastCity, 0, scy-100, scx, scy-100, tocolor(255, 255, 255, cityDrawAlpha), 1, "pricedown", "center", "top", false, false, true) 

Link to comment
dxCreateFont is only used to CREATE fonts, not to use current ones.
    dxDrawText(lastCity, 1, scy-100+1, scx+1, scy-100+1, tocolor(0, 0, 0, cityDrawAlpha), 1, "pricedown", "center", "top", false, false, true) 
    dxDrawText(lastCity, 0, scy-100, scx, scy-100, tocolor(255, 255, 255, cityDrawAlpha), 1, "pricedown", "center", "top", false, false, true) 

Oh My god, Finally!!! it worked :D Thanks so much! :D now, to change the font size i either have to do "pricedown, 25" or "pricedown",25 thats the last question :P

Thanks so much already :D

Link to comment

You must change the scale of the text, is the argument before the font.

dxDrawText(lastCity, 1, scy-100+1, scx+1, scy-100+1, tocolor(0, 0, 0, cityDrawAlpha), [color=#FF0000][size=8]1[/size][/color], "pricedown", "center", "top", false, false, true) 
    dxDrawText(lastCity, 0, scy-100, scx, scy-100, tocolor(255, 255, 255, cityDrawAlpha), [color=#FF0000][size=8]1[/size][/color], "pricedown", "center", "top", false, false, true) 

Link to comment
You must change the scale of the text, is the argument before the font.

dxDrawText(lastCity, 1, scy-100+1, scx+1, scy-100+1, tocolor(0, 0, 0, cityDrawAlpha), [color=#FF0000][size=8]1[/size][/color], "pricedown", "center", "top", false, false, true) 
    dxDrawText(lastCity, 0, scy-100, scx, scy-100, tocolor(255, 255, 255, cityDrawAlpha), [color=#FF0000][size=8]1[/size][/color], "pricedown", "center", "top", false, false, true) 

Thank you so much! :D you helped me very much :) thanks for helping me fix it :D

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...