Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/01/21 in all areas

  1. Nu e cv wow dar am zis totusi sa ii dau share Download Link: nu lmao Video: https://streamable.com/9e1xh9
    1 point
  2. Automatic compile your whole resource. Do what you want with it, but keep the formal credits. Don't forget that compiling isn't just for protection, it was also meant for optimization! Version for universal resource compiler: (NEW) resourceCompiler/meta.xml <meta> <info author="IIYAMA" type="script" name="Resource compiler" version="1.3.0" /> <script src="scripts/compiler_s.lua" /> <export function="compileResource" type="server"/> <aclrequest> <right name="function.fetchRemote" access="true" /> <right name="general.ModifyOtherObjects" access="true" /> </aclrequest> </meta> resourceCompiler/scripts/compiler_s.lua ------------------ -- by IIYAMA -- function compileResource (player, resourceName) if hasObjectPermissionTo ( player, "function.shutdown", false ) and getResourceFromName ( resourceName ) then if not hasObjectPermissionTo ( getThisResource (), "function.fetchRemote", false ) then outputChatBox(" ", player) outputChatBox("Require fetchRemote to compiling this resource!", player, 255, 0, 0) outputChatBox(" ", player) else local meta = xmlLoadFile(":" .. resourceName .. "/meta.xml") if meta then local folderName = "compiled/".. resourceName --.. "_compiled" local newMeta = xmlCopyFile(meta, folderName .. "/meta.xml") if newMeta then local metaNotes = xmlNodeGetChildren(meta) for i=1, #metaNotes do local metaNote = metaNotes[i] local scriptName = xmlNodeGetAttribute(metaNote, "src") if not scriptName or not string.match(scriptName, "compiler.lua") then if xmlNodeGetName(metaNote) == "script" then if scriptName and scriptName ~= "" then local FROM = ":" .. resourceName .. "/" .. scriptName local TO = folderName .. "/" .. scriptName .. "c" local scriptFile = fileOpen(FROM) fetchRemote( "https://luac.multitheftauto.com/?compile=1&debug=0&obfuscate=2", function(data) local newscriptFile = fileCreate ( TO ) if newscriptFile then fileWrite(newscriptFile, data) fileFlush(newscriptFile) fileClose(newscriptFile) end end, fileRead(scriptFile, fileGetSize ( scriptFile )) , true )--fileLoad(FROM) --https://luac.multitheftauto.com/api/ fileClose(scriptFile) end else local fileName = xmlNodeGetAttribute(metaNote, "src") if fileName then fileCopy (":" .. resourceName .. "/" .. fileName, folderName .. "/" .. fileName, true ) end end end end local newMetaNotes = xmlNodeGetChildren(newMeta) for i=1, #newMetaNotes do local newMetaNote = newMetaNotes[i] if xmlNodeGetName(newMetaNote) == "script" then local scriptName = xmlNodeGetAttribute(newMetaNote, "src") if not string.match(scriptName, "compiler.lua") then if scriptName and scriptName ~= "" then xmlNodeSetAttribute ( newMetaNote, "src", scriptName .. "c" ) end else xmlDestroyNode(newMetaNote) end end end xmlSaveFile(newMeta) xmlUnloadFile(newMeta) end xmlUnloadFile(meta) outputChatBox("Compiling done!", player, 0, 200, 0) end end end return true end addCommandHandler("compile", function (player, commandName, resourceName ) compileResource (player, resourceName) end) Installation: Put everything inside the folder resourceCompiler. (see file path for file name and sub folders) Use the commando: /refresh Give the resource the required rights(login as admin before you use this commando): /aclrequest allow resourceCompiler all This commando will give the resource all the rights that are defined in the meta.xml. (those are required to make the resource work) Rights: Usage: /compile [resourceName] There is an export function you can use. Now you are ready to go! Don't forget to leave a like! EXCLUDED (but can be included) Do you want to compile resources it in your admin panel as well? That would be nice right? (This source code is only on request because I do not want to be responsible for releasing a version of admin panel. My credits isn't on it as well) Like this post + send me a PM to get a look at the adminpanel adjustments! A PM with just: 'yes I want this!' is enough! Installation: Usage: Version for compiling inside the same resource: (OLD, but still useful)
    1 point
  3. Row 1, Row 2.. xyz locations, where vehicles will be spawned/respawned
    1 point
  4. As this is not a server support issue but is asking for help with code, the thread has been moved to the Scripting section.
    1 point
  5. Provavelmente pois você ficou sem o modo passivo. Então a condição não vai passar e o veículo continuará blindado. Remova a condição de modo passivo para que o veículo desblinde sempre que o motorista sair dele. (se quiser evitar que ocorra com Staffs usando /pro, vc deverá criar tal exceção.) Verifique se o veículo está blindado antes de desblindá-lo e enviar a mensagem, caso contrário a mensagem vai ficar aparecendo pra todo mundo que sair de seus veículos, mesmo se não estiverem blindados. function desblindar (thePed, seat) if (seat == 0) then -- Se o jogador saiu do assento do motorista, então: if (isVehicleDamageProof (source)) then -- Se o veículo está blindado quando o jogador sair dele, então: setVehicleDamageProof (source, false) -- Desblinda o veículo. outputChatBox ("Seu veículo agora está destrutível.", thePed) end end end addEventHandler ("onVehicleExit", root, desblindar)
    1 point
  6. @Otavionão se usa source como parâmetro de função. @[C]outofaça o script server-side, com onVehicleExit e utilizando o parâmetro do assento para saber se foi o motorista que saiu do veículo. function desblindar (thePed, seat) if (seat == 0) then if (getElementData (thePed, "Modo Passivo")) then setVehicleDamageProof (source, false) outputChatBox ("Seu veículo agora está destrutível.", thePed) end end end addEventHandler ("onVehicleExit", root, desblindar)
    1 point
  7. I recommend to check/remove the following: setTimer ( function(localPlayer) Overwriting the localPlayer with a nil value should cause problems. You could use the following useful function for blocking: elseif itemData["id"] == 34 then if checkPassiveTimer ( "limit-item-id-34", true, 10000 ) then -- this code can only run every 10 seconds end Get the function from here: https://wiki.multitheftauto.com/wiki/CheckPassiveTimer
    1 point
  8. Привет! Продолжаю дорабатывать свой редактор. Итак, на днях вышел релиз 2.1.10 (сборка 16 - сыровата, 17 сборка будет стабильной). Обновления движка - Полностью обновлён процесс загрузки / обфускации файлов - Поддержка изображений и звуков - Создан кэш для сохранения открытых архивов перед запаковкой - Исправлены баги с поворотом экрана, сохранением настроек, а также мелкие баги Обновления в редакторе - Создан поиск по содержимому файлов - Обновлена подсветка синтаксиса: HLSL, XML-подобные файлы Ссылка та же: https://play.google.com/store/apps/details?id=ru.limedev.mtacse На картинках из Google Play представлено основное, что вошло в обновление:
    1 point
  9. Voce deve realizar essa funcao no server! Usa-se este evento no server( onVehicleStartExit ) , nao use onVehicleExit, pois nao ira destruir o veiculo, pois o player ja estara fora dele! eu fiz um script parecido para meu servidor esses dias, que ficou desta forma function AclParaCadaCarro(source) local seat = getPedOccupiedVehicleSeat(source) local Veiculo = getPedOccupiedVehicle(source) local Conta = getAccountName(getPlayerAccount(source)) if getElementModel(Veiculo) == 416 and not isObjectInACLGroup( "user."..Conta, aclGetGroup ("SAMU")) and seat == 0 then local x, y, z = getElementPosition(Veiculo) removePedFromVehicle(source, Veiculo) setElementPosition(source, x+4, y, z) end end addEventHandler("onVehicleEnter", getRootElement(), AclParaCadaCarro) --[[ Server-Side ]]
    1 point
  10. https://www.youtube.com/watch?v=9x1hv3G3FWw RECORD DE RHAE, DATI UN OCHI SI LA EL.
    1 point
  11. Postou na seção errada (tutoriais em geral). Dúvidas sobre mapas você posta na seção Mapas para MTA:SA Tópico movido para a seção correta.
    1 point
×
×
  • Create New...