-
Posts
6,062 -
Joined
-
Last visited
-
Days Won
208
Everything posted by IIYAMA
-
Add another two lua files clientside and serverside, load those files as last. Add in both a wrapper function called fadeCamera and the traceback function from the site bellow. local fadeCamera2 = fadeCamera function fadeCamera (...) fadeCamera2(unpack({...})) traceback () end function traceback () local level = 1 while true do local info = debug.getinfo(level, "Sl") if not info then break end if info.what == "C" then -- is a C function? outputChatBox("C function") else -- a Lua function outputChatBox(string.format("[%s]:%d", info.short_src, info.currentline)) end level = level + 1 end end https://www.lua.org/pil/23.1.html
-
Doesn't have the event onZombieSpawn a source element? Also clean your table...
-
local weaponSkill = math.floor(level/100 * 999) As simple as that.
-
1 - Progress = invert
-
Vehicles are also serverside?
-
local myContent = { thisIsMyTable = {"value1","value2","value3","value4","value5"}, otherTable = {"value1","value2","value3","value4","value5"} } Read it and loadstring. As simple as that. Yet, why aren't you just use a lua file? And more important, what is the endresult? Or use only XML, which is in my opinion much more flexible and easy to use.
-
The text is orange, so a serverside function.
-
A very quick ban haha But good that you think about it.
-
1.3 Quick start up menu What can you do with this kind of 'quick start up'? If you join the server, it will automatic open up based on your serial. So you don't have to login with your admin account to access the debug console. Of course you can't manage quick_start_up accounts, when you haven't logged in as admin. Which also means you can give it to (trusted) people in your server, who might can help you with understanding a error or warning, without giving them full admin rights. Manage your own personal account Manage other developers their accounts Add accounts > Synchronized editing accounts (window can be used by multiple users at the same time) No reconnecting required while adding/removing
-
I tested it again and it sometimes does work and sometimes not. I think I will keep it this way. Thank you for your time, I really appreciate it.
-
Has anybody every used guiSetInputMode("no_binds_when_editing") ? Because it doesn't do anything for me. guiSetInputMode("no_binds_when_editing") I want to use binds unless I am editing inputs, but it is simple doing nothing at all.
-
Ask the creator of the script to fix it or try another resource. This is not something we are suppose to fix, unless it is your own code. "Pls be aware of the rights of creations." (IIYAMA, 2016)
-
The default map editor doesn't have that function. You could try to search on the community for an alternative editor or request this feature on: https://bugs.multitheftauto.com Good luck.
-
It has been a while that I last posted on this topic. I was very busy, sorry for that. Anyway, is on the agenda: QuickStartUp(99%) QuickStartUp makes it possible to use the console even if you are not logged in. Open/close/minimize the window(90%) A database(30%) ■ Finished ■ Working on ■ Waiting... I haven't had much feedback lately, does that mean that everything is working for everybody?
-
Keep it serverside, because (most of) the client scripts are starting after the download. You could try to use a delay: addEventHandler("onPlayerJoin", root, function() setTimer(function (player) if isElement(player) then outputChatBox("**Please wait, download in progress**", player, 255, 0, 0) fadeCamera(player, true) setCameraMatrix(player, 2003, -881, 130, 1832, -1249, 64) end end, 3000, 1, source) end)
-
Probably a bad resource that is using the: root element for the addEventHandler with 'onResourceStart'.
-
Check: https://community.multitheftauto.com/in ... ls&id=2363
-
Wrong section Pathetic, crying on somebody else his doorstep.
-
Decompiled code looks different than before you compiled it. It is throwing information away for optimisation. Compiling code was original for optimize the code, the protecting layer came later. > Compiled code is the end result, it is not meant to be edited. Anyway, pls answer my question. Simple yes/no + the reason.
-
Something else, it is not(yet) related to the Debug Console. Annoyed with compiling your resources every time, script by script? Check out this page: automatic resource compiler. And now my question, even if the Debug Console isn't related to compiling resources. Do you want it to have this feature to compile automatic other resources? Since the debug console is already running, while developing your own resources.
-
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)
-
Explosions are splash damage and not bullet damage. The use of getPedTarget won't help you. Only a GTA san damage overwrite would.
-
Explosion damage can't be cancelled, because the weapon is most of the time unknown. Unless you write a system, that replaces the damage dealing.
-
if attacker then end
-
GTA san is limited to only 1 CPU core and MTA is also limited to 1 core. If you make your code unoptimised, new CPU's with more cores will not make a lot of difference. The Ghz per core isn't something that will be increased dramatically, so yes a little bit optimisation isn't too much to ask. I am having an Intel i7-3770K 3.50Ghz 4 cores with multithreading to virtual 8 cores. If I write very unoptimised code, I am still stuck at only 1 core. That is when my GTA san is starting to crash. Good CPU? Not for MTA and unoptimised code. And if you want to share it with your friends = download speed.