Jump to content

Maark

Members
  • Posts

    24
  • Joined

  • Last visited

Recent Profile Visitors

628 profile views

Maark's Achievements

Civilian

Civilian (7/54)

2

Reputation

  1. I found a problem, when panel is closed, if you move your mouse, the cpu usage from resource will increase a lot (A LOT!), i will try to fix this, probably is the event system
  2. No, i dont know about this function, i put in the code and now is 2451 KB in memory @edit, i put 6 times and now is 212KB, thats nice (i see in stackoverflow we need use 2 times do destroy)
  3. Ty, but still 36403KB in memory =/
  4. im trying to do like this local string = nil function FileUnProtection(path, key, clear) print("loaded") local file = fileOpen(path) local size = fileGetSize(file) local FirstPart = fileRead(file, 65536 + 4) fileSetPos(file, 65536 + 4) local SecondPart = fileRead(file, size - (65536 + 4)) fileClose(file) if file ~= nil then file = nil end if size ~= nil then size = nil end return decodeString('tea', FirstPart, { key = key })..SecondPart end function FileUnProtection2(path, key, clear) if path and key and clear == nil then print("loading") local returnDATA = FileUnProtection(path, key, nil) return returnDATA elseif clear then print("clearing") print(returnDATA) -- prints nil ._. if returnDATA ~= nil then returnDATA = nil print("cleared") end if file ~= nil then file = nil end if size ~= nil then size = nil end if FirstPart ~= nil then FirstPart = nil end if SecondPart ~= nil then SecondPart = nil end end end local string1 = FileUnProtection2('549.txdcw', 'password', nil) local txd = engineLoadTXD(string1) engineImportTXD(txd, 549) local string1 = nil local string2 = FileUnProtection2('549.dffcw', 'password', nil) local dff = engineLoadDFF(string2) engineReplaceModel(dff, 549) local string2 = nil FileUnProtection2(nil, nil, true) but in ipb still in Lua Memory
  5. how i can do that? i trying right now but its not working :X
  6. this save in a variable a lot of MB, i can clear it and still working the dff? u know?
  7. first, use code <> to fix the problem, you need put the player in arguments to get account data bool triggerServerEvent ( string event, element theElement, [arguments...] ) code fixed: bank = triggerServerEvent("bank-hajs-panel", localPlayer, localPlayer) (you are sending the event to localPlayer, and sending the localPlayer in arguments to get the data.) if i help u, give a thanks pls!
  8. i want get the vehicle/skins xml (list) in other resource, ex: "resource called: xmlList" so, i create a command or a function to update it. Like, i add another vehicle to Freeroam, i dont need restart freeroam, i just need restart the xmlList and do a command "ex: /restartvehiclelist" and freeroam reload the xml without restarting
  9. I want to create a "system" to update any xml (or only the vehicles.xml) without restart the Freeroam. Like, i create a second resource with alls xml's ex: resouce1: freeroam, resource2 = xmllist, then i put in xml options in freeroam, the ':xmllist/vehicles.xml' for example. (everything alright) But, when i restart the xmllist, do not update the freeroam, and i want create a command or a way to "refresh" the xml/gridlist. I found a way, but it "duplicate" the freeroam window. function testeeetalkei() wndCreateVehicle = { 'wnd', text = 'Create vehicle', width = 300, controls = { { 'lst', id='vehicles', width=280, height=340, columns={ {text='Vehicle', attr='name'} }, rows={xml=':xmllist/vehicles.xml', attrs={'id', 'name'}}, onitemdoubleclick=createSelectedVehicle, DoubleClickSpamProtected=true, }, {'btn', id='create', onclick=createSelectedVehicle, ClickSpamProtected=true}, {'btn', id='close', closeswindow=true} } } wndMain = { 'wnd', text = 'FR GUI', x = 10, y = 150, width = 280, controls = { {'lbl', text='Local player'}, {'br'}, {'btn', id='kill', onclick=killLocalPlayer}, {'btn', id='skin', window=wndSkin}, {'btn', id='anim', window=wndAnim}, {'btn', id='weapon', window=wndWeapon}, {'btn', id='clothes', window=wndClothes}, {'btn', id='playergrav', text='grav', window=wndGravity}, {'btn', id='warp', window=wndWarp}, {'btn', id='stats', window=wndStats}, {'btn', id='bookmarks', window=wndBookmarks}, {'br'}, {'chk', id='jetpack', onclick=toggleJetPack}, {'chk', id='falloff', text='fall off bike', onclick=toggleFallOffBike}, {'br'}, {'chk', id='disablewarp', text='disable warp', onclick=toggleWarping}, {'chk', id='disableknife', text='disable knifing', onclick=toggleKnifing}, {'chk', id='antiram', text='anti-ramming (vehicle ghostmode)', onclick=toggleGhostmode}, {'br'}, {'lbl', text='Pos:'}, {'lbl', id='xpos', text='x', width=45}, {'lbl', id='ypos', text='y', width=45}, {'lbl', id='zpos', text='z', width=45}, {'btn', id='setpos', text='map', window=wndSetPos}, {'btn', id='setinterior', text='int', window=wndSetInterior}, {'br'}, {'br'}, {'lbl', text='Vehicles'}, {'br'}, {'lbl', text='Current:'}, {'lbl', id='curvehicle'}, {'br'}, {'btn', id='createvehicle', window=wndCreateVehicle, text='create'}, {'btn', id='repair', onclick=repairVehicle}, {'btn', id='flip', onclick=flipVehicle}, {'btn', id='upgrades', window=wndUpgrades}, {'btn', id='color', onclick=openColorPicker}, {'btn', id='paintjob', window=wndPaintjob}, {'br'}, {'chk', id='lightson', text='Lights on', onclick=forceLightsOn}, {'chk', id='lightsoff', text='Lights off', onclick=forceLightsOff}, {'br'}, {'br'}, {'lbl', text='Environment'}, {'br'}, {'btn', id='time', window=wndTime}, {'chk', id='freezetime', text='freeze', onclick=toggleFreezeTime}, {'btn', id='weather', window=wndWeather}, {'btn', id='speed', window=wndGameSpeed} }, oncreate = mainWndShow, onclose = mainWndClose } createWindow(wndMain, true) hideAllWindows() end addCommandHandler('test', testeeetalkei) this way, i restart the xmllist resource and /test and works, but duplicate the window, anyone know how to do this without duplicate or create a function to delete old window or only update the xml? idk how to do it (note: this code is in fr_client.Lua (clientside)) (note2: found some functions that work with xml: function _buildWindow(wnd, baseWnd, parentWnd) -- at line 141 in gui.Lua -- some code... if wnd.rows then -- at line 227 if wnd.rows.xml then -- get rows from xml bindGridListToTable(wnd, not gridListHasCache(wnd) and xmlToTable(wnd.rows.xml, wnd.rows.attrs) or false, wnd.expandlastlevel or wnd.expandlastlevel == nil) else -- rows hardcoded in window definition bindGridListToTable(wnd, not gridListHasCache(wnd) and wnd.rows or false, false) end end --- etc.. end )
  10. do you have plans for this to work on Lives or does the MTA not let it?
  11. Thank you! worked and the problem is fixed. I updated to version 20402 and everything is 100% now.
  12. I fix 3 events without first argument, but nothing happened =/
  13. Interesting, but in my case it doesn't triple and etc, it just doubles, regardless of how many players I will check to see if it is related to this
  14. I'm having a problem, when I'm on a team, some outputChatBox end up doubling, both the chat, as well as some alert scripts, and for those who aren't on any team, it remains normal, in the Log, everything is normal. Note: it is not a problem of Freeroam, Tag script. I search in all my files for outputChatBox and found nothing wrong. In team: Without TEAM set: Is this a MTA problem? (Everything was normal when I closed the server, reopened with everything the same and now this is happening.) (Closed the server in 1.5.6 and re-opened in 1.5.7)
×
×
  • Create New...