Jump to content

drk

Members
  • Posts

    1,607
  • Joined

  • Last visited

Everything posted by drk

  1. 1 - Hate record. 2 - Stolen ideas 3 - Very bad deco Sorry dude but you can make much better
  2. Thanks. Used event "onClientPreRender" and worked.
  3. Same shit I can't put it to work.
  4. If I use ipairs it create only one rectangle, if I use pairs it create all.
  5. That's what I did, don't work. If I use simple gui label work
  6. 1. What do you mean by 'defined' ? 2. I tried many times and don't work.
  7. X-SHADOW, are you kidding us?
  8. Ok I found the problem I need some time to try to solve. Problem: self.ePostGUI -> nil Edit: Nop, it's not the problem.
  9. He want to put map name on gamemode column in server browser.
  10. But anyway I want to put my library working perfectly
  11. Hi. So, I created a dx rectangles library, it works perfectly, then I created a dx text library for colorcodes. All works perfectly but the dx text appears behind the rectangle, I put postGUI argument to true and don't work. I tried to find the problem, but nothing... DX Text: list [ 1 ] = dx:Create ( getPlayerName ( localPlayer ), ( 312 / 800 ) * x, ( 453 / 600 ) * y, ( 161 / 800 ) * x, ( 20 / 600 ) * y, { 255, 255, 255, 255 }, 1, 'default', 'center', 'left', false, false ); DX Rectangle: top = dxRectangle:Create ( ( 274 / 800 ) * x, ( 426 / 600 ) * y, ( 278 / 800 ) * x, ( 169 / 600 ) * y, { 0, 0, 0, 210 }, false ); DX Text library: dx = { } dx.__index = dx local visible = { } function dx:Create ( Text, X, Y, W, H, Color, Scale, Font, AlignX, AlignY, Clip, Wordbreak ) if ( type ( Text ) == "string" and type ( X ) == "number" and type ( Y ) == "number" and type ( W ) == "number" and type ( H ) == "number" and type ( Scale ) == "number" ) then local text = { eText = Text; eX = X; eY = Y; eW = W; eH = H; eColor = Color; eScale = Scale; eFont = Font; eClip = Clip; eWordbreak = WordBreak; ePostGUI = true } setmetatable ( text, { __index = dx } ) visible [ text ] = true; return text end end function dx:Color ( ) return unpack ( self.eColor ) end function dx:SetColor ( r, g, b, a ) self.eColor = { r, g, b, a } end function dx:Text ( text ) self.eText = text end addEventHandler ( 'onClientRender', root, function ( ) for self, _ in pairs ( visible ) do while true do draw ( self.eText, self.eX, self.eY, self.eW, self.eH, tocolor ( unpack ( self.eColor ) ), self.eScale, self.eFont, self.eAlignX, self.eAlignY, self.eClip, self.eWordbreak, self.PostGUI ) break end end end ) function draw ( str, ax, ay, bx, by, color, scale, font, left, top, clip, wordbreak, postGUI ) local pat = "(.-)#(%x%x%x%x%x%x)" local s, e, cap, col = str:find(pat, 1) local last = 1 while s do if cap == "" and col then color = tocolor( tonumber( "0x"..col:sub( 1, 2 ) ), tonumber( "0x"..col:sub( 3, 4 ) ), tonumber( "0x"..col:sub( 5, 6 ) ), 255 ) end if s ~= 1 or cap ~= "" then local w = dxGetTextWidth(cap, scale, font) dxDrawText( cap, ax, ay, ax + w, by, color, scale, font ) ax = ax + w color = tocolor( tonumber( "0x"..col:sub( 1, 2 ) ), tonumber( "0x"..col:sub( 3, 4 ) ), tonumber( "0x"..col:sub( 5, 6 ) ), 255 ) end last = e + 1 s, e, cap, col = str:find( pat, last ) end if last <= #str then cap = str:sub( last ) local w = dxGetTextWidth( cap, scale, font ) dxDrawText( cap, ax, ay, ax + w, by, color, scale, font, left, top, clip, wordbreak, postGUI ) end end
  12. LOOL X-SHADOW, If you don't know how to script properly, why you keep posting bugged scripts? Here: addEvent ( 'onMapStarting', true ); addEventHandler ( 'onMapStarting', root, function ( ) setGameType ( getMapName ( ) ); end ) Idk if I'm using function correctly, try.
  13. drk

    Scoreboard Help

    If you want to put them in order, create the team by order you want lol
  14. GUIEditor is friendly LOL It haves a tutorial where you can learn how to use it, it's simple and you can make whatever you want.
  15. No. If you put all with false value, will be like there are no serials equal to the player's serial.
  16. index with boolean value "true" as data will be "parsed", "false" will not be "parsed".
  17. drk

    Car paint

    Not needed. I created a command to set the account name. /account ACCOUNTNAME It must be server-side.
  18. drk

    Car paint

    local theAccount = '' addCommandHandler ( 'account', function ( ped, cmd, acc ) if ( not acc ) then return end; theAccount = tostring ( acc ) end ) addEventHandler ( 'onPlayerLogin', root, function ( _, acc ) if ( getAccountName ( acc ) == theAccount ) then setVehicleColor ( getPedOccupiedVehicle ( source ), R, G, B ); end end ) Example: /account dream On player login will set vehicle color if account is 'dream'.
  19. drk

    Recording Map

    Your pc isn't good enough for recording maps. You need get a better graphic card and more ram.
  20. If you have learn for 1 year you need know that when you trigger for one player, will only execute the string for the PLAYER.
  21. drk

    Problems

    oO What is it? Your code totally wrong
×
×
  • Create New...