Jump to content

CoreyHUN

Members
  • Posts

    31
  • Joined

  • Last visited

Everything posted by CoreyHUN

  1. Here it is. function drawInventory() dxDrawRectangle(startposX, startposY, startsizeX, startsizeY, tocolor(0, 0, 0, 180), false) dxDrawRectangle(startposX, startposY, startsizeX, 20, tocolor(0, 0, 0, 255), false) dxDrawText("Inventory", startposX, startposY, 1, 1, tocolor(255, 255, 255, 255), 1.20, "default", "left", "top", false, false, false, false, false) for k, v in pairs (slots) do if v[3] == true then dxDrawRectangle(slotposX, slotposY, startsizeX - 10, slotsizeY, tocolor(70, 70, 70, 255), false) dxDrawText(tostring(v[8]), slotposX + 50, slotposY + 10, 1, 1, tocolor(255, 255, 255, 255), 1.1, "default", "left", "top", false, false, false, false, false) if not (v[6] == nil) then dxDrawImage(slotposX + 5, slotposY + 5, 30, 30, v[6]) end local minslotposx = slotposX local minslotposy = slotposY + 40 for y = 1, v[5] do for x = 1, v[4] do for key, item in pairs (items) do if not(x == item[3] and y == item[4]) then dxDrawRectangle(minslotposx, minslotposy, 30, 30, (isCursorInPosition(minslotposx, minslotposy, 30, 30) and tocolor(85, 85, 85, 255) or tocolor(100, 100, 100, 255)), false) else if isCursorInPosition(minslotposx, minslotposy, item[5] * 30 - 1, item[6] * 30 - 1) then if item[9] == false then function clickNMove() if getKeyState("mouse1") then local cx, cy = getCursorPosition() local cax, cay = cx * screenW, cy * screenH local sx, sy = (slotposX) - cax, (slotposY + 40) - cay local fx, fy = math.abs(math.floor(sx / 31)), math.abs(math.floor(sy / 31)) if fx == item[3] and fy == item[4] then item[9] = true if item[9] == true then slotW = item[3] slotH = item[4] else item[9] = false end end else item[9] = false end end bindKey("mouse1", "down", clickNMove) end end if v[1] == item[2] then if v[4] >= (item[3] * item[5] - 1) and v[5] >= (item[4] * item[6] - 1) then if item[9] == false then if item[5] > 1 then if item[6] > 1 then dxDrawRectangle(minslotposx, minslotposy, (30 * (item[5]) + item[5] - 1), (30 * (item[6]) + item[6] - 1), (isCursorInPosition(minslotposx, minslotposy, (30 * (item[5]) + item[5]), (30 * (item[6]) + item[6])) and tocolor(85, 85, 85, 255) or tocolor(100, 100, 100, 255)), true) else dxDrawRectangle(minslotposx, minslotposy, (30 * (item[5]) + item[5] - 1), (30 * (item[6])), (isCursorInPosition(minslotposx, minslotposy, (30 * (item[5]) + item[5]), (30 * (item[6]))) and tocolor(85, 85, 85, 255) or tocolor(100, 100, 100, 255)), true) end else dxDrawRectangle(minslotposx, minslotposy, (30 * (item[5])), (30 * (item[6])), (isCursorInPosition(minslotposx, minslotposy, (30 * (item[5])), (30 * (item[6]))) and tocolor(85, 85, 85, 255) or tocolor(100, 100, 100, 255)), true) end dxDrawImage(minslotposx, minslotposy, (30 * item[5]), (30 * item[6]), item[8], 0, 0, 0, tocolor(255, 255, 255, 255), true) else local cx, cy = getCursorPosition() local cax, cay = cx * screenW, cy * screenH local sx, sy = (slotposX) - cax, (slotposY + 40) - cay local fx, fy = math.abs(math.floor(sx / 31)), math.abs(math.floor(sy / 31)) if item[5] > 1 then if item[6] > 1 then dxDrawRectangle(cax, cay, (30 * (item[5]) + item[5] - 1), (30 * (item[6]) + item[6] - 1), (isCursorInPosition(cax, cay, (30 * (item[5]) + item[5]), (30 * (item[6]) + item[6])) and tocolor(85, 85, 85, 255) or tocolor(100, 100, 100, 255)), true) else dxDrawRectangle(cax, cay, (30 * (item[5]) + item[5] - 1), (30 * (item[6])), (isCursorInPosition(cax, cay, (30 * (item[5]) + item[5]), (30 * (item[6]))) and tocolor(85, 85, 85, 255) or tocolor(100, 100, 100, 255)), true) end else dxDrawRectangle(cax, cay, (30 * (item[5])), (30 * (item[6])), (isCursorInPosition(cax, cay, (30 * (item[5])), (30 * (item[6]))) and tocolor(85, 85, 85, 255) or tocolor(100, 100, 100, 255)), true) end dxDrawImage(cax, cay, (30 * item[5]), (30 * item[6]), item[8], 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText(tostring(fx).." "..tostring(fy).." ", 300, 300, 1, 1, tocolor(255, 255, 255, 255), 1.1, "default", "left", "top", false, false, false, false, false) function dropSlot() if fx > v[4] or fy > v[5] then --Sloton kívüli geci item[9] = false item[3] = slotW item[4] = slotH else for index, value in pairs (items) do if fx == value[3] or fy == value[4] then if item[9] == true then item[9] = false item[3] = slotW item[4] = slotH end else item[3] = fx item[4] = fy item[9] = false end end end end bindKey("mouse1", "up", dropSlot) end else outputChatBox("Nincs elég hely: "..item[1]) end end end end minslotposx = minslotposx + slotspace end minslotposy = minslotposy + slotspace minslotposx = slotposX end minslotposx = slotposX minslotposy = slotposY + 45 if (v[5] > 3) then slotposY = slotposY + 45 * v[5] else slotposY = slotposY + space end else dxDrawRectangle(slotposX, slotposY, startsizeX - 10, slotsizeY, tocolor(100, 100, 100, 255), false) dxDrawText(v[8], slotposX + 50, slotposY + 10, 1, 1, tocolor(255, 255, 255, 255), 1.1, "default", "left", "top", false, false, false, false, false) if not (v[6] == nil) then dxDrawImage(slotposX + 5, slotposY + 5, 30, 30, v[6]) end slotposY = slotposY + 45 end end slotposY = startposY + 25 end
  2. Any ideas why is this :~ happening? function dropSlot() if fx > v[4] or fy > v[5] then --Sloton kívüli geci item[9] = false item[3] = slotW item[4] = slotH else for index, value in pairs (items) do if fx == value[3] or fy == value[4] then if item[9] == true then item[9] = false item[3] = slotW item[4] = slotH end else item[3] = fx item[4] = fy item[9] = false end end end end bindKey("mouse1", "up", dropSlot)
  3. Is it possible to have source code for it?
  4. CoreyHUN

    deleted

    Man, this project is a beast, keep up the good work.
  5. This thing is pretty easy to create, doesn't worth it to buy for anyone. Just need to use your brain.
  6. Hey guys, does anybody have any information about how to increase the volume of the voice chat? Or to convert it to 3D Sound? Like playSound3D?
  7. Hey mate, i dunno if you did it, but did you fix the item saving? cuz its still not saving for me. You said the saving is not even called, which line is it? Cuz maybe i could fix it. Items are working well, but vehicles don't save anything
  8. You are the best mate! Edit: I tested it, i copied my data table into the script, but after i save vehicles with vehbk, and restart the resource, and load the vehicles using loadvehs, still not saving the items
  9. Items from vehicle isn't saving, but i think i will made it if i have time. I'd really appreciate it
  10. Man, you are absolutely awesome. EDIT: btw, i just tested, and items in the vehicle didn't save. I copied the whole itemTable so what should be the problem?
  11. Guys, is there any resource which creates a meta.xml from the folder's files? I mean like, there's a folder called files, i put 3 files, a DFF,TXD,COL and the generator creates an XML file, and adds all the files to it like: Like in ModLoader resource, automaticly generates the META file from the files. Is there any resource like that?
  12. It's on playSound3D, i didn't changed the volume yet, i will modify them later, i just wanted to test how the Arma sounds would work ingame.
  13. What would i buy? The sounds? Got them exactly from the PBOs
  14. Well, it's not a big deal, and one of my first scripts, but sounds a lot better than the original ones.
  15. Open all the scripts, CTRL+H and replace all M4 with M4A1 CCO in all documents
  16. Hey guys, what should i use, to create a weapon like on the video? I mean, what functions should i use for the camera rotation, aiming, weapon creation, fire etc.. I can't really figure it out.
  17. CoreyHUN

    MTA Vehicle Crash

    I don't know how, but it's got fixed by time so... lol Thanks anyway Greetings
  18. CoreyHUN

    MTA Vehicle Crash

    Nope, it's a fresh new GTA
  19. CoreyHUN

    MTA Vehicle Crash

    Hey guys, an interesting problem just occured for me, if i spawn a car in editor, or play mod, my game instantly crashes, i reinstalled the game, for the first start, it was working, but after awhile started crashing again, anybody knows a solution for it? Error Code: Version = 1.4.1-release-7166.0.000 Time = Wed May 06 22:11:00 2015 Module = C:\MTA SAN ANDREAS\gta_sa.exe Code = 0xC0000005 Offset = 0x0032FC4A EAX=00000000 EBX=00B24E3C ECX=00000088 EDX=08200081 ESI=00000000 EDI=000001AD EBP=00B24E3C ESP=0028F328 EIP=0072FC4A FLG=00010206 CS=0023 DS=002B SS=002B ES=002B FS=0053 GS=002B
  20. Still one of the best things i've ever seen.
  21. Csak egy egyszerű videó
  22. Guys, i just installed Windows 8.1 on my PC, and when i wanna start MTA, i get an error (on the image) and GTA SA Crashes too. EDIT: NVIDIA driver were fucked up, serveral version do this, i unstalled 327 driver, and it's fixed the problem.
×
×
  • Create New...