Jump to content

Aibo

Retired Staff
  • Posts

    1,105
  • Joined

  • Last visited

Everything posted by Aibo

  1. Aibo

    what is wrong?

    painel_policial is not a gui element.
  2. Aibo

    Buy Maps

    you expect people to look through 250 lines of code (that probably isnt even yours) and tell you what is wrong?
  3. well if its all blurry stuff with no alpha, they you wouldnt really notice. anyway i've said all i could, if you dont want to listen — whatever. bye.
  4. where's the proof of those images that look perfect with any size?
  5. stop talking nonsense. where does "source" come from?
  6. 1. 'папочка' — это и есть ресурс 2. луа файлы — это не ресурсы, а скрипты 3. что бы что-то от функции получить, надо чтобы она что-то возвращала 4. читаем вики: https://wiki.multitheftauto.com/wiki/Call -- example_1/lua function MatchSumm(a,b) return a and b and a + b or false end -- exmaple_1/meta.xml function="MatchSumm" type="server" /> -- example_2/lua c = exports["example_1"]:MatchSumm(1,2) просто счесть переменную нельзя, но через функции можно попробовать.
  7. while 512 is, 386 is not a power of 2. im not an expert in how GPU-related stuff works, but i'll try to explain as i can. there is a "power of 2" rule for texture sizes (hint: google it). since every picture you load into MTA (using DX or GUI functions) is created and stored as a texture, it occupies some space in video memory. and that space uses that "power of 2" sizing. (there's also somethign about mipmapping, but i wouldnt even dare to explain) so, lets say you load a 400 x 386 image: it will occupy a 512x512 "block", since it's the next closest "power of 2" size. and it will be scaled up to fit that block. so now we got 400x386 texture scaled to 512x512. and you'll never get the pixel-perfect original image from that. when you'll draw it with 400x386 size it will be scaled down to that size (again) but the quality was already lost when it was upscaled. and it is blurry and transparency on the edges get fucked up and all that. so to get your images look like they should, you should always create them with "power of 2" sizes. they dont have to be the same for width and height, but both dimensions should be 2^x. like 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, etc
  8. my point is "don't fix something that isn't broken"
  9. you wont be kicked with "Dora_the_explorer" name, because that table key has a capital letter. same with all other names, except the last 2. and the whole thing wont work anyway because you forgot to close the table constructor.
  10. why in the world its 3 spaces?
  11. 1. use power of 2 image sizes like 4, 8,128, 256, any number that is 2^x 2. dont stretch your image, use the same size as it is in photoshop.
  12. so i could understand the what the fuck do you mean by "shit quality". quality can degrade in various ways, like jpeg artifacts due to compression, lowered bit depth, fucked up alpha channel, broken color profiles, etc.
  13. where are the screenshots of the problem?
  14. local title = xmlNodeGetValue(xmlFindChild(group,'title', 0)) -- получаем данные из дочернего нода local text = xmlNodeGetValue(xmlFindChild(group,'text', 0)) -- получаем данные из дочернего нода guiGridListSetItemData(GUIEditor_Grid[1], row, 1, toJSON({title, text})) -- сохраняем в данных итема используя JSON-массив -- далее, в хендлере клика: local data = fromJSON(guiGridListGetItemData ( GUIEditor_Grid[1], row, column )) -- получаем/парсим JSON guiSetText(lblTitle, data[1] or 'No title') -- отправляем title в лейбл guiSetText(GUIEditor_Label[1], data[2] or 'No text') -- отправляем text в лейбл
  15. Aibo

    Chat

    it doesnt work with getPlayerName because you're using clientside bindKey syntax in a clientside script. and first argument of handler function is not an element there. read wiki. anyway, this shit is retarded.
  16. outputChatBox() accepts numbers and strings, but here the number->string conversion is done by concatenation operator ".." anyway, this is not the issue, stop arguing.
  17. можно 2 значения хранить в 1 строке, используя, например: 1. JSON 2. разделить строки + split() 3. loadstring()
  18. это потому, что в guiGridListSetItemData можно хранить только 1 строку данных в 1 ячейке.
  19. yeah, server-side getCameraMatrix() looks broken, returns false always. better move to client for now.
  20. your problem is that getCameraMatrix returns false, which means thePlayer is not an element. changing variable name to _PED wont fix it, and formatting false return through string.format also. do this: function matrix(thePlayer) -- First define the function outputChatBox("thePlayer: "..tostring(isElement(thePlayer) or type(thePlayer))) if exports.global:isPlayerHeadAdmin( thePlayer ) then local x, y, z, lx, ly, lz = getCameraMatrix(thePlayer) outputChatBox(""..x..", "..y..", "..z..", "..lx..", "..ly..", "..lz.."", thePlayer) end end addCommandHandler ( "matrix", matrix ) see what it'll show in player variable type
  21. FFS YOU'RE NOT FIXING HIS PROBLEM ALSO all you people do is showing off how cool you are with your cool syntax that doesnt even help. if it returns false and nil — no string fomatting gonna help it, god dammit.
  22. addCommandHandler ( "fo", function ( thePlayer ) if not(isElement (wdwIndfo)) then GUIEditor_Window = {} GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Window[1] = guiCreateWindow(199,106,659,561,"TITLE",false) GUIEditor_Grid[1] = guiCreateGridList(10,27,256,520,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],2) guiGridListAddColumn(GUIEditor_Grid[1],"",0.2) GUIEditor_Label[1] = guiCreateLabel(295,45,329,469,"Info",false,GUIEditor_Window[1]) guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",true) local xml = xmlLoadFile("settings.xml") if xml then for i,group in ipairs(xmlNodeGetChildren(xml)) do local row = guiGridListAddRow(GUIEditor_Grid[1]) local name = xmlNodeGetAttribute(group,"name") guiGridListSetItemText(GUIEditor_Grid[1],row,1,name,false, false) local data = xmlNodeGetValue(xmlNodeGetChildren(group,0)) -- получаем данные из дочернего нода guiGridListSetItemData(GUIEditor_Grid[1],row,1, data) -- сохраняем в данных итема end xmlUnloadFile(xml) end else destroyElement (wdwIndfo) end end ) function item_choose() if isElement(wdwIndfo) then if source == GUIEditor_Grid[1] then local row, column = guiGridListGetSelectedItem ( GUIEditor_Grid[1] ) -- определяем выбранный элемент local data = guiGridListGetItemData ( GUIEditor_Grid[1], row, column ) -- получаем хранящиеся там данные guiSetText(GUIEditor_Label[1], data or 'No info') -- отправляем их в лейбл end end end addEventHandler ("onClientGUIClick", root, item_choose) как-то так.
  23. this will only concatenate 1 value from getCameraMatrix return.
×
×
  • Create New...