Jump to content

SnoopCat

Members
  • Posts

    413
  • Joined

  • Last visited

Everything posted by SnoopCat

  1. first of all go to kiwi6.com then upload the mp3 file get the link that must be finish whit the music file extencion like this .mp3 then replace playSound("sounds/yoursound.mp3") for playSound("http://musicfilehosting.com/yourmp3.mp3") note this is only a example
  2. jajaj estan buenas Muerte en 3 2 1....
  3. humm i will show us the race text library , i edited it too textlib.lua urfont = dxCreateFont("urfont.ttf",13) dxText = {} dxText_mt = { __index = dxText } local idAssign,idPrefix = 0,"c" local g_screenX,g_screenY = guiGetScreenSize() local visibleText = {} ------ defaults = { fX = 0.7, fY = 0.5, bRelativePosition = true, strText = "", bVerticalAlign = "center", bHorizontalAlign = "center", tColor = {255,0,0,255}, fScale = 0.0, strFont = "urfont", strType = "default", tAttributes = {}, bPostGUI = false, bClip = false, bWordWrap = true, bVisible = true, tBoundingBox = false, --If a bounding box is not set, it will not be used. bRelativeBoundingBox = true, } local validFonts = { default = true, ["default-bold"] = true, clear = true, arial = true, pricedown = true, bankgothic = true, diploma = true, beckett = true, urfont = true, } local validTypes = { normal = true, shadow = true, border = true, stroke = true, --Clone of border } local validAlignTypes = { center = true, left = true, right = true, } function dxText:create( text, x, y, relative, strFont, fScale, horzA ) assert(not self.fX, "attempt to call method 'create' (a nil value)") if ( type(text) ~= "string" ) or ( not tonumber(x) ) or ( not tonumber(y) ) then outputDebugString ( "dxText:create - Bad argument", 0, 255, 0, 112 ) return false end local new = {} setmetatable( new, dxText_mt ) --Add default settings for i,v in pairs(defaults) do new[i] = v end idAssign = idAssign + 1 new.id = idPrefix..idAssign new.strText = text or new.strText new.fX = x or new.fX new.fY = y or new.fY if type(relative) == "boolean" then new.bRelativePosition = relative end new:scale( fScale or new.fScale ) new:font( strFont or new.strFont ) new:align( horzA or new.bHorizontalAlign ) visibleText[new] = true return new end function dxText:text(text) if type(text) ~= "string" then return self.strText end self.strText = text return true end function dxText:position(x,y,relative) if not tonumber(x) then return self.fX, self.fY end self.fX = x self.fY = y if type(relative) == "boolean" then self.bRelativePosition = relative else self.bRelativePosition = true end return true end function dxText:color(r,g,b,a) if not tonumber(r) then return unpack(self.tColor) end g = g or self.tColor[2] b = b or self.tColor[3] a = a or self.tColor[4] self.tColor = { r,g,b,a } return true end function dxText:scale(scale) if not tonumber(scale) then return self.fScale end self.fScale = scale return true end function dxText:visible(bool) if type(bool) ~= "boolean" then return self.bVisible end if self.bVisible == bool then return end self.bVisible = bool if bool then visibleText[self] = true else visibleText[self] = nil end return true end function dxText:destroy() self.bDestroyed = true setmetatable( self, self ) return true end function dxText:font(font) if string.lower(type(font)) ~= "string" and not validFonts[font] then return self.strFont end self.strFont = font return true end function dxText:postGUI(bool) if type(bool) ~= "boolean" then return self.bPostGUI end self.bPostGUI = bool return true end function dxText:clip(bool) if type(bool) ~= "boolean" then return self.bClip end self.bClip = bool return true end function dxText:wordWrap(bool) if type(bool) ~= "boolean" then return self.bWordWrap end self.bWordWrap = bool return true end function dxText:type(type,...) if not validTypes[type] then return self.strType, unpack(self.tAttributes) end self.strType = type self.tAttributes = {...} return true end function dxText:align(horzA, vertA) if not validAlignTypes[horzA] then return self.bHorizontalAlign, self.bVerticalAlign end vertA = vertA or self.bVerticalAlign self.bHorizontalAlign, self.bVerticalAlign = horzA, vertA return true end function dxText:boundingBox(left,top,right,bottom,relative) if left == nil then if self.tBoundingBox then return unpack(boundingBox) else return false end elseif tonumber(left) and tonumber(right) and tonumber(top) and tonumber(bottom) then self.tBoundingBox = {left,top,right,bottom} if type(relative) == "boolean" then self.bRelativeBoundingBox = relative else self.bRelativeBoundingBox = true end else self.tBoundingBox = false end return true end addEventHandler ( "onClientRender", getRootElement(), function() for self,_ in pairs(visibleText) do while true do if self.bDestroyed then visibleText[self] = nil break end if self.tColor[4] < 1 then break end local l,t,r,b --If we arent using a bounding box if not self.tBoundingBox then --Decide if we use relative or absolute local p_screenX,p_screenY = 1,1 if self.bRelativePosition then p_screenX,p_screenY = g_screenX,g_screenY end local fX,fY = (self.fX)*p_screenX,(self.fY)*p_screenY if self.bHorizontalAlign == "left" then l = fX r = fX + g_screenX elseif self.bHorizontalAlign == "right" then l = fX - g_screenX r = fX else l = fX - g_screenX r = fX + g_screenX end if self.bVerticalAlign == "top" then t = fY b = fY + g_screenY elseif self.bVerticalAlign == "bottom" then t = fY - g_screenY b = fY else t = fY - g_screenY b = fY + g_screenY end elseif type(self.tBoundingBox) == "table" then local b_screenX,b_screenY = 1,1 if self.bRelativeBoundingBox then b_screenX,b_screenY = g_screenX,g_screenY end l,t,r,b = self.tBoundingBox[1],self.tBoundingBox[2],self.tBoundingBox[3],self.tBoundingBox[4] l = l*b_screenX t = t*b_screenY r = r*b_screenX b = b*b_screenY end local type,att1,att2,att3,att4,att5 = self:type() if type == "border" or type == "stroke" then att2 = att2 or 0 att3 = att3 or 0 att4 = att4 or 0 att5 = att5 or self.tColor[4] outlinesize = att1 or 2 if outlinesize > 0 then for offsetX=-outlinesize,outlinesize,outlinesize do for offsetY=-outlinesize,outlinesize,outlinesize do if not (offsetX == 0 and offsetY == 0) then
  4. humm font is good cuz im using atm on other things :B anyway i tested it and not working whit other font... i tested ur code and not working too...
  5. digamos q se llama em [DM]Bike only - by ciclista extremo jaja aparte lo digo por q tiene saltos lokos y esas cosas...
  6. kerian un Race DM? vercion real? aki lo tienen jaja
  7. u forget to create urfont = dxCreateFont("urfont.ttf",13) at start and seems to be the same..
  8. yo parto pa q entiendan... [imagen eliminada]
  9. nop , just showing a default font....
  10. plz i need a helping hand on this...
  11. SnoopCat

    [REL]K-Garage

    i think u must expand the garage list so we can see the text complete and make the buttons more smaller
  12. hello guy now i have this problem , im trying to change fonts of my race to a custom fonts and i did this but is not working , only shows a default font and i want to show a custom font urfont = dxCreateFont("urfont.ttf",13) g_Root = getRootElement() g_ResRoot = getResourceRootElement(getThisResource()) g_Me = getLocalPlayer() g_ArmedVehicleIDs = table.create({ 425, 447, 520, 430, 464, 432 }, true) g_WaterCraftIDs = table.create({ 539, 460, 417, 447, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454 }, true) g_ModelForPickupType = { nitro = 2221, repair = 2222, vehiclechange = 2223 } g_HunterID = 425 g_Checkpoints = {} g_Pickups = {} g_VisiblePickups = {} g_Objects = {} addEventHandler('onClientResourceStart', g_ResRoot, function() g_Players = getElementsByType('player') fadeCamera(false,0.0) -- create GUI local screenWidth, screenHeight = guiGetScreenSize() g_dxGUI = { ranknum = dxText:create('1', screenWidth - 99.9, screenHeight - 700, false, 'bankgothic', 2.0, 'right'), --orig 3 ranksuffix = dxText:create('vivos', screenWidth - 55, screenHeight - 700, false, 'bankgothic', 0.9), --orig 0.8 checkpoint = dxText:create('0/0', screenWidth - 15, screenHeight - 54, false, 'bankgothic', 0.8, 'right'), mapdisplay = dxText:create('Map:', 2, screenHeight - dxGetFontHeight(0.4,urfont), false,urfont, 1, 'left'), mapdisplayName = dxText:create('none', 55, screenHeight - dxGetFontHeight(0.4, 'pricedown'), false, 'pricedown',1, 'left'), as you can see its supposed to be the mapdisplay = dxText:create('Map:', 2, screenHeight - dxGetFontHeight(0.4,urfont), false,urfont, 1, 'left'), whit a custom font but isnt working...
  13. SnoopCat

    Youtube Intro

    hello MTa World i wanna show us my simply and new maked intro e.e its not hard to do , i do it whit windows movie maker kuz idk how to use sony vegas and that things but there we go jeje say what do u think about it PD:if you want a simply intro like this one add me on msn and i can teach you how to do it [email protected]
×
×
  • Create New...