Jump to content

Search the Community

Showing results for tags 'help'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

  1. i need that mod , but i can't find that, who can help me ? P.S: is a panel mods, sorry for the bad quality
  2. I recently dove into this simple thing called "scripting and building a server". Naturally —added to my already curious personality—, I always come up with a doubt, a question, or any sort of uncertainty. After a week of messing around with it, I noticed that 5 of the 10 last posts made in the Script section were from me. I was having so much fun —truthfully— that I just kept on finding new things to ask. I'm pretty sure they are common questions. I'm not asking to have a script from scratch, or to be taught absolutely everything. It is most commonly about errors and to help myself understand the colloquial language of the scripts. However, I can't help but think that maybe it's not the best approach. I always think to myself "try to find it on your own", but I frenquently find myself getting even more confused the more I tour into each command and function. Is there a certain tacit limit as to how many questions can be asked? Is there any way to get the necessary help without flooding the sections?
  3. I've found six issues so far. Being alone, everything seemed fine; with players, these issues are visible. For the sake of organization and to avoid overwhelming, I'll be going through each issue (if possible), instead of throwing everything at once —unless asked otherwise—. First in the list is about client.Lua's 'outputChatBox' showing to everyone in the chatbox: I've got two scripts in this moment that are causing said inconvenient: a quick ATM system and a teleport system. The ATM is a simple marker that, when hit, gives you $500, and outputs that information. The teleports work the same way, but instead, the set the interior, position and rotation of the player, and output a message. ATM: Client: (this example's location is at LV's gas station, next to Four Dragon's Casino). atm1 = createMarker (2123.0048828125, 897.57653808594, 10.1796875, "cylinder", 1, 0, 100, 0, 170) function moneyLawn (hitPlayer, matchingDimension) if (source == atm1) and (isPedInVehicle(hitPlayer) == false) then triggerServerEvent ("givePlayerMoney", hitPlayer) outputChatBox ("#D2691E[#FF7F50INFO#D2691E]#FFFFFF: El servidor te regaló #006400$500.", 0, 0, 0, true) end end (translation: "The server gave you $500") Server: function giveToPlayer () givePlayerMoney (root, 500) end addEvent ("giveMoney", true) addEventHandler ("giveMoney", root, giveToPlayer) Because of its close relation, I'll also name another issue regarding this script. The money is being given to all players in the server, and it is being multiplied by each player. This means that is, for example, I have 3 players in my server, when any player touches the marker, each player will be given $500 x amountOfPlayers = $1500. Teleports: (I have a few other teleports, but they only change interior and position). Client: ------------------------- -- FOUR DRAGONS CASINO -- ------------------------- inFourD = createMarker (2019.76953125, 1007.0116577148, 9.7203125, "cylinder", 1, 255, 0, 0, 153) function inFourDragons (hitPlayer, matchingDimension) if (source == inFourD) and (isPedInVehicle(hitPlayer) == true) then outputChatBox("#D2691E[#FF7F50INFO#D2691E]#FFFFFF: No se permiten vehículos dentro.", 0, 0, 0, true) elseif (source == inFourD) and (isPedInVehicle(hitPlayer) == false) then outputChatBox("#D2691E[#FF7F50INFO#D2691E]#FFFFFF: Ingresaste al casino '#DD0000Four Dragons#FFFFFF'.", 0, 0, 0, true) setElementInterior (hitPlayer, 10) setElementPosition (hitPlayer, 2016.9376220703, 1017.0843505859, 996.875 ) setElementRotation (hitPlayer, 0, 0, 90) end end addEventHandler ("onClientMarkerHit", root, inFourDragons) outFourD = createMarker (2018.9376220703, 1017.0843505859, 995.875, "cylinder", 1, 255, 0, 0, 153) setElementInterior (outFourD, 10) function outFourDragons (hitPlayer, matchingDimension) if (source == outFourD) and (isPedInVehicle(hitPlayer) == true) then outputChatBox("#D2691E[#FF7F50INFO#D2691E]#FFFFFF: No se permiten vehículos dentro.", 0, 0, 0, true) elseif (source == outFourD) and (isPedInVehicle(hitPlayer) == false) then outputChatBox("#D2691E[#FF7F50INFO#D2691E]#FFFFFF: Te retiraste del casino '#DD0000Four Dragons#FFFFFF'.", 0, 0, 0, true) setElementInterior (hitPlayer, 0) setElementPosition (hitPlayer, 2021.76953125, 1007.0116577148, 10.7203125 ) setElementRotation (hitPlayer, 0, 0, 90) end end addEventHandler ("onClientMarkerHit", root, outFourDragons) [translation: (if player in veh) "No cars allowed". (if player not in veh) "You've entered/exited "Four Dragons" casino".] There is no server. This similar post, which I'm following, says that in client-side, the output is bound to be shown just for the player who triggered the event.
  4. Boa Noite, Gostaria de saber se pode me passa como devo fazer para quando um objeto fica flutuando no ar, ele cair direto no chao. Evitando de fica bugado do ar. Obrigado
  5. Hi I'm new to the community + PC gaming in general so I play with a Logitech gamejoy controller. I got most of the controls down to fit with the buttons but I'm having trouble aiming, firing while driving, and other simple but necessary controls like pausing to switch servers or quit the game. Can someone screenshot their button layout or help me with getting the controls correct? I plan on playing a lot and just want this out the way first
  6. 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 )
  7. How to creaye a chat bot for output some words loop in main chat pls help me ?
  8. I'm having trouble translating the scripts into colloquial language (to build the concepts in my head and understand what happens and what triggers the events). My ultimate objective is to add a help window that shows the functions of my server. This is what I researched so far: *I know some things may be obvious to the experienced developer. My intension is to "think out loud" so, if I'm mistaken, the reader(s) will point out my errors. With a stock MTA, pressing 'F9' (resource: helpmanager) opens a help window that shows two tabs: 'votemanager' and 'freeroam'. Respectively, each are run by their own resource that go by the same names. This means that if I stop one, the tab will be gone; If I stop both, there will be no tabs visible. Therefore, it is safe to say that both tabs are being added by a script (the window elements creation, the text, the size, etc), into the 'helpmanager' help window. While I can edit either tab to show the desired info, if I plan on stopping both resources (votemanager and freeroam) from starting in the near future, they will not be visible. Thus, the only path left I have is to add a script of my own that will only show the desired info in a new tab on the 'F9' help window. My questions are: - How can I create a text inside new tab inside the window of another script? *I know how to create a window. My issue is creating an uneditable text inside the window of a different resource. - How can I stop 'votemanager' and 'freeroam' from starting when the server.exe is ran. *I've tried looking for the resource in mtaserver.conf, but I can't find any trace of a resource that's related to freeroam. I do want to keep 'play', for the moment.
  9. Hello can anyone help me to get zones script Like CIT and also like IAnnas one
  10. [SOLVED] This will certainly be a beginner's subject. The folder [gameplay], located in "Resources", is filled with .rar files. I want to edit 'help.xml', which is inside "freeroam.rar". I tried extracting everything into a new folder called "freeroam", but my server is not detecting said folder. I'm sure I'm ignoring a command somewhere that's failing to locate the folder (might be written to only locate "freeroam.rar"). What can I do to reach the file, modify it, and keep the freeroam files working?
  11. Здравствуйте, я уже Вторые сутки пытаюсь запустить видео через html в мта, используя стандартный браузер, постер на видео получается поставить, т.е путь к постеру видит, а видео не запускается. Всё перепроверил, иначе бы сюда не пришёл. Уже проверил в двух браузерах, изменяя путь на простой, всё работает. В мта - в никакую. Ставил и убирал кодеки. Изменял теги <video>. ничего не помогает. Изменял путь и многое другое, в надежде чуда. Ничего, как понимаешь, не помогло. Код ниже index.html: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <video width="1280" height="720" controls autoplay="true" loop="true" muted="true" poster="http://mta/local/media/111.jpg" > <source src="http://mta/local/media/movie.webm" type="video/webm; codecs="vp8, vorbis""/> </video> </body> </html> client.Lua: local webView = guiCreateBrowser(0, 0, 1280, 720, true, true, true) local theBrowser = guiGetBrowser(webView) -- Get the browser element from gui-browser addEventHandler("onClientBrowserCreated", theBrowser, function() -- loadBrowserURL(source, "http://mta/local/html/index.html") loadBrowserURL(source, "http://mta/local/index.html") focusBrowser(source) end) meta.xml: <meta> <script src="client.Lua" type="client" /> <file src="index.html"/> <file src="media/movie.webm"/> <file src="media/111.jpg"/> </meta>
  12. I am done. I've made a function to display text on elements, on server-side, and I wanted to trigger client event, but what? Doesn't triggering. Look: allElems = 0 function dxDrawTextOnElem(element, text, height, distance, r, g, b, alpha, size, font) allElems = allElems + 1 triggerClientEvent("dxDraw", resourceRoot, element, text, height or 0, distance or 20, r or 255, g or 0, b or 0, alpha or 255, size or 1, font or "arial", allElems) end Boom, client-side script: --Ofcourse, I've created all tables + in "onClientRender" I put outputChatBox(), outputs "{}" (because tables are empty) addEvent("dxDraw", true) addEventHandler("dxDraw", resourceRoot, function(element, text, height, distance, r, g, b, alpha, size, font, k) local i = table.find(elements, element) --table.find(pattern, s) if i then elements[i] = element texts[i] = text heights[i] = height distances[i] = distance rs[i] = r gs[i] = g bs[i] = b alphas[i] = alpha sizes[i] = size fonts[i] = font else elements[k] = element texts[k] = text heights[k] = height distances[k] = distance rs[k] = r gs[k] = g bs[k] = b alphas[k] = alpha sizes[k] = size fonts[k] = font end end) addEventHandler("onClientRender", root, function() for i, text in ipairs(texts) do dxDrawTextOnElement(elements[i], text, heights[i], distances[i], rs[i], gs[i], bs[i], alphas[i], sizes[i], fonts[i]) end end) Jesus, I'm done with it. Sorry for asking a similar thing, but it's really difficult for me. For real, I'm like doing it second time, still fails.
  13. Hello, I would like to know how I can or if it is possible to make a marker on the map to set a handling in the player's car. I would also like to know how to place a marker with a 3d image on the map
  14. This, don't work. Idk why. Look: addEventHandler("onClientRender", resourceRoot, function() dxDrawTextOnElement(localPlayer, "P L A Y E R", 1, 20, 0, 0, 255, 255, 1, "pricedown") end) Ofcourse, I have dxDrawTextOnElement() function in my script and script is in type client.
  15. Write me a script how to do it, I will be very grateful
  16. I tried to load a file, that is in a subfolder, nothing's happening, no errors in console. What's the problem (all code below)? Line of code in script, to load xml file: xml = xmlLoadFile("cars/saved.xml") meta.xml: <file src="cars/saved.xml"/> What's wrong? BTW, everything exists. IDK what's wrong with this, everything's is existing, file is assigned into xml. I clearly don't know what's worng.
  17. I have a shared script that stores a parameter provided function into a table: -- shared_script.Lua local my_table = {} function addFunctionality(key, handler) my_table[key] = handler end The point is that it's stored two different tables - client and server side. When addFunctionality is called from a client script the handler is stored only inside the respective side table. What I need is a way to communicate between both client and server to store the handler in both tables independently of who is calling addFunctionality. The tables need to be synced and have the same data. I know there are functions server/client only, but forget that for now. For the purpose of this help bear in mind I'm trying to store this function: function() return true end But from the point of view of addFunctionality you never know how handler's implementation looks like. I've already tried to: - Use events, but they do not accept functions as arguments - Store the table in the root element, but it's not possible at all - Use loadstring, but 1) I don't know how handler's implementation looks like and 2) it doesn't return values Thanks
  18. Today, I was testing my policeman job (that I will surely post) on my server, because I wanted to know, if other players (not from one XML file) can access to be policemans. Suddenly, I saw, that on other nickname, I can open F1 panel. So what can I do? Thanks everybody for advance. Here is my part of acl.xml for proof, that only me and my friend are in Admin group: <acl> <group name="Everyone"> <acl name="Default"></acl> <object name="user.*"></object> <object name="resource.*"></object> </group> <group name="Moderator"> <acl name="Moderator"></acl> <object name="resource.mapcycler"></object> <object name="resource.mapmanager"></object> <object name="resource.resourcemanager"></object> <object name="resource.votemanager"></object> </group> <group name="SuperModerator"> <acl name="Moderator"></acl> <acl name="SuperModerator"></acl> </group> <group name="Admin"> <acl name="Moderator"></acl> <acl name="SuperModerator"></acl> <acl name="Admin"></acl> <acl name="RPC"></acl> <object name="resource.admin"></object> <object name="resource.webadmin"></object> <object name="resource.acpanel"></object> <object name="resource.modloader"></object> <object name="resource.loginpanel"></object> <object name="resource.bank"></object> <object name="resource.stats"></object> <object name="resource.vsys"></object> <object name="resource.cp"></object> <object name="resource.Serwer"></object> <object name="user.VaporZ"></object> <!--My nick--> <object name="user.maxeo11"></object> <!--My friend's nick--> <object name="resource.job3"></object> <object name="resource.cs"></object> </group> blah blah blah blah blah blah </acl>
  19. I'm just curious. Is there a way, to remove spawned cars on the Play/Freeroam gamemode. For example: monster trucks at Grove Street with bikes, along with Buffalo near Ryder's house. Just want to include some modded maps onto my server, and I don't want cars to bug out [from custom map]. If there's a script to it, or a line that i can change in a code - can you sent it here? Thanks in advance!
  20. I've made a marker-variable (code): exitF = createMarker(246.85884094238, 62.326526641846, 1003.640625, "cylinder", 1.5, 0, 162, 255, 172) Since I've put here a LSPD coordinates, It should work, but It's not. Even If I've inserted, that I want to move this marker to interior ID 3, it's STILL DOESN'T APPEARING. setElementInterior(exitF, 3) Help me! Screenshot from the game (couldn't insert): https://drive.google.com/open?id=13eVt7Pk0VJG3H0RtpWswAJTMj9BdzWh8
  21. I want create a HUD with image progress bars. I think i need dxDrawImageSection, but i don't know how to use this for a progress bar. Anyone can give me a example of this progress bar with imagesection?
  22. Boa Noite, Eu to com problema, fiz um timer a onde cria o objeto quando chega proximo da col, e deu certo mais ele fica criando varias vezes o mesmo objeto e queria que cria-se apenas 1 vez, so que com o timer rodando ainda setTimer(function(col) local cx, cy, cz = getElementPosition (col) --Aqui você deve colocar a posição do loot.. local px, py, pz = getElementPosition (localPlayer) --Aqui você acha a localização do player. local distancia = math.floor(getDistanceBetweenPoints3D (cx, cy, cz, px, py, pz)) -- outputChatBox(distancia) if tonumber(distancia) <= 20 then --Caso a distância seja maior ou igual que "x", então.. outputChatBox("COL PROXIMA: "..distancia) -- if not(isElement(obejctItem[counter])) then obejctItem[counter] = createObject(item[2],cx,cy,cz,item[4]) setObjectScale(obejctItem[counter],item[3]) setElementCollisionsEnabled(obejctItem[counter], false) setElementFrozen (obejctItem[counter],true) outputChatBox("OBJETOS CRIADOS") -- end else -- if isTimer(timerObjetos) then -- killTimer(timerObjetos) -- end if (cx and cy and cz) then if isElement(obejctItem[counter]) then destroyElement(obejctItem[counter]) end end -- outputChatBox("COL FORA: "..distancia) end end,1000,0,col)
  23. Estou recebendo aviso no console direito de uma função que eu fiz quando o player entra no hit de uma col AVISOS QUE FLOODA O CONSOLE. WARNING: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] ERROR: attempt to concatenate a boolean value --[[Aviso]] -- isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin")) function chePlayergr(player,x,y,z,baseName) if isElement(player) then cheTimer = setTimer(function(player,baseName) if not((getElementData(player,"Group") == getGroupNameFromBaseName(baseName)) or isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Admin"))) then if isTimer(cheTimer) then killTimer(cheTimer) end setElementPosition(player,x,y,z+1) end end,2000,0,player,baseName) end end
  24. EU ACHEI O PROBLEMA, MAIS PRECISO DE AJUDA. No meu servidor de DayZ ele tem objetos criados que são as GEAR itens que dropa em toda parte do mapa e na area 51 também e como a area 51 é editada com objetos também ela fica pistando eu vou mostrar imagens. UMA PARTE DO SCRIPT DA GAMEMODE, ESSE SCRIPT ABAIXO É AS 'GEAR' a onde dropa os itens dentro de uma Col. OBS: esse escript é server.Lua function createPickupsOnServerStart() iPickup = 0 for i,pos in ipairs(pickupPositions["residential"]) do iPickup = iPickup + 1 createItemLoot("residential",pos[1],pos[2],pos[3],iPickup) end for i,pos in ipairs(pickupPositions["industrial"]) do iPickup = iPickup + 1 createItemLoot("industrial",pos[1],pos[2],pos[3],iPickup) end for i,pos in ipairs(pickupPositions["farm"]) do iPickup = iPickup + 1 createItemLoot("farm",pos[1],pos[2],pos[3],iPickup) end for i,pos in ipairs(pickupPositions["supermarket"]) do iPickup = iPickup + 1 createItemLoot("supermarket",pos[1],pos[2],pos[3],iPickup) end for i,pos in ipairs(pickupPositions["military"]) do iPickup = iPickup + 1 createItemLoot("military",pos[1],pos[2],pos[3],iPickup) end end createPickupsOnServerStart() function createItemLoot(lootPlace,x,y,z) col = createColSphere(x,y,z,1.25) setElementData(col,"itemloot",true) setElementData(col,"parent",lootPlace) setElementData(col,"MAX_Slots",12) for i, item in pairs(itemTable[lootPlace]) do if not tonumber(item[5]) then outputServerLog(item[1]) end local value = math.percentChance (item[5],math.random(1,2)) setElementData(col,item[1],value) end refre:~emLoot (col,lootPlace,true) return col end > Essa imagem é com os objetos da gamemode(ITENS) ATIVADO, olhe como ela some os objetos. https://ibb.co/tDKn0Lg > Já essa aqui é com esse aqui é com os (ITENS) DESATIVADO DA GAMEMODE, ela renderiza certinho o mapa. https://ibb.co/YPsG9VH Ai queria se colocando uma função de distancia da col de cada GEAR, iria resolver ou o que? OBRIGADO DESDE DE JÁ
  25. Is there a way to prevent this from happening? I'm making a movement script with cubic-bezier support, but when I render the movement onClientPreRender the server kinda limit the executions. DEMONSTRATION
×
×
  • Create New...