Maark

Members
  • Content Count

    16
  • Joined

  • Last visited

Community Reputation

2 Neutral

About Maark

  • Rank
    Square

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 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
  2. 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 )
  3. do you have plans for this to work on Lives or does the MTA not let it?
  4. Thank you! worked and the problem is fixed. I updated to version 20402 and everything is 100% now.
  5. I fix 3 events without first argument, but nothing happened =/
  6. 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
  7. 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)
  8. Na verdade tem sim, utilize SetElementAlpha https://wiki.multitheftauto.com/wiki/SetElementAlpha
  9. its impossible what im trying to do =/ im trying to apply a shader with if if BOPE == true then if id == 490 then local image = "skinbope" local bopetextura = dxCreateTexture("images/"..image..".png","dxt3") dxSetShaderValue(theTechnique,"gTexture",bopetextura) texturabope = theTechnique engineApplyShaderToWorldTexture(texturabope, "skin", theVehicle) elseif id == 596 then end end but if i put a condition (if) the engineApplyShaderToWorldTexture only apply for players who have the condition...
  10. so i can put like this? addEventHandler("onClientVehicleEnter", remotePlayers, applyShader) return remotePlayers nil in debugscript
  11. I created a script to set texture when player joins the car, (EngineApplyShaderToWorldTexture), but work only client-side, i wanna other players see the texture from the car, not only the local player see self texture. How i can create a script like this?
  12. i already tried and dont work like the way above
  13. local vehicleid = getVehicleID ( theVehicle ) function AdminCarRemoval ( button, state, player ) if ( button == "left" and state == "down" ) then if ( isElement(source) ) and ( getElementType(source) == "vehicle" ) then if ( isGuestAccount(getPlayerAccount(player)) ) then return end if ( aclGetGroup ( "Admin" ) ) and ( isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(player)), aclGetGroup ( "Admin" ) ) and (vehicleid == 411) ) then destroyElement (source) outputChatBox('Successfully destroyed the vehicle.',player,255,255,0,true) end end end end addEventHandler( "onElementClicked", getRootElement( ), AdminCarRemoval ) to add more vehicles use or ex: (vehicleid == 411 or 412 or 413) if this dont work try this (vehicleid == 411 or vehicleid == 412 or vehicleid == 413)