-
Posts
52 -
Joined
-
Last visited
Recent Profile Visitors
1,322 profile views
Mature's Achievements
Snitch (10/54)
1
Reputation
-
Hello, I want to know how I can send my file to compile with the MTA API, but not in .LUA but in JS through fetch.
-
Hello guys, well I'm looking for how to send a file to be encrypted by the MTA api, but I didn't have any results, could someone help me? I'm using the Node JS language, but a good explanation would help.
-
Hello, I'm trying to work with the MTA SDK in Node js as I saw in this topic https://forum.multitheftauto.com/topic/79810-nodejs-sdk-v100/; I happen to be able to make the connection only on a local server, if I try to connect to any server it gives the TCP PORT error, I've tried to put it as 22005 but it didn't work, can someone help me?
-
Pode enviar seu código por favor para te ajudar?
-
Só altere a ACL, coloquei como admin, mas deve funcionar function abrir1 (thePlayer) if (thePlayer) and (getElementType (thePlayer) == "player") then if (isGuestAccount(getPlayerAccount(thePlayer)) == false) and isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "Admin" ) ) then triggerClientEvent (thePlayer, "tec9gui", thePlayer) end end end addEventHandler ("onMarkerHit", tec9, abrir1)
-
utilize resourceRoot em ambos scripts no lugar do root
-
Envia o código de quando abre ele por favor, ou você pode adicionar: --#Adicione isso quando o painel abrir local timerDelay function openPanel () if not isTimer(timerDelay) then --#Painel abriu timerDelay = setTimer(function() end, 3000, 1) else --#Informa que o painel não pode ser acionado no momento end end
-
Não testei, mas pode funcionar local blip = {} addEventHandler('onResourceStart', resourceRoot, function () local player = nil for i=1, #getElementsByType("player") do player = getElementsByType("player")[i] local x,y,z = getElementPosition(player) blip[player] = createBlipAttachedTo ( player, 0) if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(player)), aclGetGroup ("Moderator")) or isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(player)), aclGetGroup ("SuperModerator")) or isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(player)), aclGetGroup ("Admin")) or isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(player)), aclGetGroup ("Console")) then setElementVisibleTo (blip[player], player, true ) else setElementVisibleTo (blip[player], player, false ) end end end) addEventHandler('onPlayerQuit', root, function () if blip[source] then destroyElement(blip[source]) end end) addEventHandler('onPlayerLogin', root, function () local x,y,z = getElementPosition(source) blip[source] = createBlipAttachedTo (source, 0) setElementVisibleTo (blip[source], root, false ) if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup ("Moderator")) or isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup ("SuperModerator")) or isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup ("Admin")) or isObjectInACLGroup ("user."..getAccountName(getPlayerAccount(source)), aclGetGroup ("Console")) then local blips = nil for i=1, #getElementsByType("blip", resourceRoot) do blips = getElementsByType("blip", resourceRoot)[i] setElementVisibleTo (blips, source, true ) end end end)
-
é servidor de freeroam?
-
para não ter risco dele pressionar algo que tenha uma função de unfreeze, da para cancelar as teclas do teclado, pode funcionar addEventHandler("onClientKey", root, function (button, press) if (press) then cancelEvent() end end) Ou utilizando um setTimer com um isElementFrozen e se o frozen ser falso ativa ele novamente https://wiki.multitheftauto.com/wiki/IsElementFrozen
-
AJUDA POR FAVORRRR
Mature replied to Fonseca's topic in Ajudas relacionadas ao MTA:SA (Cliente/Servidor)
Não flooda men -
Hello, I have a doubt that I have no idea to execute, I would like to create a radio frequency system, along with the voice, after the player pressing 'Z', he will speak normally in the voice and when pressing, for example, ' X 'he will speak in the voice of the radio or in the key configured as Tokovoip, is it possible? How can I do? you don't need to give me the script by hand, just tell me what to use. Thank you in advance
-
Hello, I have a problem that I don't understand, the inventory loads normally, but it is loading only slots 1 and 2, it is not loading slot 8, but if the slots are in sequence, it loads normally, can someone help me? On the server when I finish loading I pull the value that the table is on and it always returns me as 2, instead of 3 As it is in the database: https://imgur.com/LEXgGQf As it is in the inventory: https://imgur.com/undefined (The black slots are basically occupied by an item) The Event ("rzk: load: items") is done when you open the inventory Server: addEvent('rzk:load:all:items', true) addEventHandler('rzk:load:all:items', resourceRoot, function (thePlayer) local idPlayer = tonumber(getElementData(thePlayer, 'char:id')) if idPlayer then local hq = dbQuery(sql, "SELECT * FROM Items WHERE owner=?", idPlayer) local loaderQuery = dbPoll(hq, -1) if #loaderQuery ~= 0 then local loadQ = nil for i = 1, #loaderQuery do loadQ = loaderQuery[i] if not items[thePlayer] then items[thePlayer] = {} end if not items[thePlayer][tonumber(loadQ["slot"])] then items[thePlayer][tonumber(loadQ["slot"])] = {} end items[thePlayer][tonumber(loadQ["slot"])] = { ["itemid"] = tonumber(loadQ["itemid"]), ["value"] = tonumber(loadQ["value"]), ["type"] = tonumber(loadQ["type"]), ["slot"] = tonumber(loadQ["slot"]), ["actionslot"] = tonumber(loadQ["actionslot"]), ["dutyitem"] = tonumber(loadQ["dutyitem"]), } print('Carregada') end end end end) addEvent('rzk:load:items', true) addEventHandler('rzk:load:items', resourceRoot, function (thePlayer) if items[thePlayer] then print(#items[thePlayer]) triggerClientEvent(thePlayer, 'rzk:client:load:item', resourceRoot, items[thePlayer]) end end) Client: addEventHandler('onClientResourceStart', resourceRoot, function () triggerServerEvent('rzk:load:all:items', resourceRoot, localPlayer) end) addEvent('rzk:client:load:item', true) addEventHandler('rzk:client:load:item', resourceRoot, function (tabela) if tabela then tableItems = tabela for i = 1, #tableItems do if tableItems[i] then if not items then items = {} end if not items[i] then items[i] = {} end items[i] = { ["itemid"] = tonumber(tableItems[i]["itemid"]), ["value"] = tonumber(tableItems[i]["value"]), ["type"] = tonumber(tableItems[i]["type"]), ["slot"] = tonumber(tableItems[i]["slot"]), ["actionslot"] = tonumber(tableItems[i]["actionslot"]), ["dutyitem"] = tonumber(tableItems[i]["dutyitem"]), } print(tableItems[i]["slot"]) end end loadInv = true end end)
-
Hello, I am creating a large script and I would like to know how many percent are considered healthy for a script to reach IPB and start to be something bad for the player and the server?