Jump to content

TwiX!

Members
  • Posts

    905
  • Joined

  • Last visited

Everything posted by TwiX!

  1. In 3 page. maybe just make other rectagle? 'i'm said (for dxDrawColoredText)' \n not work
  2. but need new line with rectagle
  3. No problem. What you mean? If someone connect, then draw first name . if next connect, draw next name. Like this Someone connect: Server: Kenix has join the server. Again someone connect.( if last drawing then +1 row .If not draw new.( 1 row ) ). So draw it: Server: Kenix has join the server. Server: Qwety~ has join the server. And in 5 sec hide. its draw only text , not dxDrawRectangle local sText = '' local uTimer function dxDrawRelativeText( text,posX,posY,right,bottom,color,scale,mixed_font,alignX,alignY,clip,wordBreak,postGUI ) local resolutionX = 1280 local resolutionY = 1024 local sWidth,sHeight = guiGetScreenSize( ) return dxDrawColorText( tostring( text ), ( posX/resolutionX )*sWidth, ( posY/resolutionY )*sHeight, ( right/resolutionX )*sWidth, ( bottom/resolutionY)*sHeight, color,( sWidth/resolutionX )*scale, mixed_font, alignX, alignY, clip, wordBreak, postGUI ) end function dxDrawRelativeRectangle( posX, posY, width, height,color,postGUI ) local resolutionX = 1280 local resolutionY = 1024 local sWidth,sHeight = guiGetScreenSize( ) return dxDrawRectangle( ( posX/resolutionX )*sWidth, ( posY/resolutionY )*sHeight, ( width/resolutionX )*sWidth, ( height/resolutionY )*sHeight, color, postGUI ) end function fDraw( quitReason ) sText = sText..string.format( '#ffffffServer: %s #ffffffhas %s the server %s \n', getPlayerName( source ), eventName == 'onClientPlayerQuit' and 'left' or eventName == 'onClientPlayerJoin' and 'join', eventName == 'onClientPlayerQuit' and '[' .. quitReason .. ']' or '' ) if isTimer( uTimer ) then killTimer( uTimer ) end uTimer = setTimer( function( ) sText = '' end, 5000, 1 ) end addEventHandler( 'onClientRender', root, function( ) if sText ~= '' then dxDrawRelativeRectangle( 245.0,0.0,365.0,23.0,tocolor( 0,0,0,210 ),false ) dxDrawRelativeText( sText,254.0,0.0,757.0,20.0,tocolor(255,255,255,255),1.0,"default-bold","left","top",false,false,false) end end ) addEventHandler ( 'onClientPlayerQuit', root, fDraw ) addEventHandler ( 'onClientPlayerJoin', root, fDraw ) function dxDrawColorText(str, ax, ay, bx, by, color, scale, font, alignX, alignY) if alignX then if alignX == "center" then local w = dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font) ax = ax + (bx-ax)/2 - w/2 elseif alignX == "right" then local w = dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font) ax = bx - w end end if alignY then if alignY == "center" then local h = dxGetFontHeight(scale, font) ay = ay + (by-ay)/2 - h/2 elseif alignY == "bottom" then local h = dxGetFontHeight(scale, font) ay = by - h end end 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) end end for dxdrawcolortext, \n not work
  4. Yes, it's show only who in server. its will bad, cause if 2 players connect in 1-3 second, background will drawning '1', text '2' "\n"
  5. клиент или сервер? если клиент то он путать не будет их если сервер то https://wiki.multitheftauto.com/wiki/SetElementData setElementData ( thePlayer, marker, "type1",true)
  6. https://wiki.multitheftauto.com/wiki/SetAccountData https://wiki.multitheftauto.com/wiki/SetElementData и т.д
  7. yes, but it's impossible for .zip format, only for folders
  8. ну мне просто интересно) почему ты не можешь найти, вот и всё, ладно закрыли тему
  9. UCP = User Control Panel (В большинстве случаев ставят на сайт) Как 'Web Stats' так то идём норм
  10. почему другие люди должны тратить на тебя время, и искать ТЕБЕ, ТВОЙ же РЕСУРС
  11. ты научишься когда нибудь юзать поиск?
  12. не могу даже зайти туда, окно весит Access Denied
  13. мне там постоянно пишет "Access Denied." доступ запрещён. ничего сделать не могу..
  14. cпасибо дайте ссылку где можно запросить функцию или аргумент, на баг трекере, хочу попросить редактирование .zip файлов, а то бред получается, есть встроенный архиватор, но с ним ничё сделать нельзя, если будет простая папка не зип, то можно из игры переименовать удалить и т.д
  15. TwiX!

    server FFS

    http://crankedservers.com
  16. проверяй тогда каждую строчку выводом сообщения, других путей не вижу
  17. на многих серверах видел анимацию (картинка типо .gif) как это сделать? не используя +100500 кусков .png
  18. смотря чё именно хочешь, сроки, объём работы, рубли, доллары, евро
  19. fraps заказывает в HD сони вегас, это прога для редактирования видео, да она делает из норм видео HD, но если оно 240p то хд не выйдет
  20. Fraps + sony vegas если ты запишешь видео с качеством 240 то на 1080 ты его не как не сделаешь Kenix правильно сказал
×
×
  • Create New...