You don't need the GUIEditor table if you're not using it. You'll be fine with just the Project table. Just make sure you declared it before any of it's content.
I think that it would be good to have exec function (that will execute program or shell/console command) at our disposal. To regulate it from being misused, you can add the ACL right specifically for it.
And yes, it does fix something (as I previously stated). This is fact*.
It is way easier to execute the critical function than running a disassembler on MTA server and eventually locating the exact moment the script is decrypted and pausing it. And removing the issue I first stated would leave this option as the only one remaining to achieve the desired result.
Theoretically, there is always a possibility, but the likelihood of it's exercise reduces massively upon removing the most threatening issue.
@myonlake: Actually, it does fix anything (something)! It just doesn't fix everything*. BTW, did you ever take any dissembler classes? There is a lot of work to it. It is very unlikely that a person who wishes to steal is going to know this much.
Actually, in international English standards, you use (modern) British English (–ise), not American English (–ize). Besides, I only expressed my view but you called me an idiot which I find quite offensive.
Your opinion? Then why is your opinion to scold me for pointing out the issues of MTA that could have been easily avoided. It's not like I didn't try to help. And even if I was implying to remove the built-in decrypt function, it could still work. They could've still sent the request from the server to luac.multitheftauto.com and receive the bytecode for runtime. It's not like the server is not going to be connected to the Internet.
And as of realize/realise issue, it is actually fine to write it both ways. I just corrected you because you're using British spelling to sound smart, when obviously you are not.
And why did I expect a normal non-narcissistic response from a MTA forum user? (rhetorical question if you dont realiZe) Idiot. I was referring to the built-in Lua function that dumps the bytecode.
You tried hard to make the scripts more secure, yet you've failed to eliminate the most obvious method of 'decrypting' the extra obfuscated file. *Ironic Well-Done Clap*
local music = { ["pokerface"] = "music/pokerface.mp3", ["fox"] = "music/fox.mp3" }
local sound
local soundname = ""
function playMusic(command)
if (sound) then
stopSound(sound)
destroyElement(sound)
end
if (soundname ~= command) then
sound = playSound(music[command])
setSoundVolume(sound, 50)
setSoundMaxDistance( sound, 5000 )
end
soundname = command
end
for k in pairs(music) do
addCommandHandler(k, root, playMusic)
end
Maybe this.
-- CLIENT
triggerServerEvent ("CJAPS",root,23,950)
-- SERVER
function CJAPSs(stat,value)
setPedStat (client,stat,value)
end
addEvent("CJAPS",true)
addEventHandler("CJAPS",root,CJAPSs)
'client' is a predefined variable. Maybe this would work.
function newElement(name)
local countID = 0
while getElementByID(name, countID) do
countID = countID + 1
end
local self = {}
self.element = createElement("Test", name)
self.destroy = "destroyElement(getElementByID('" .. name .. "', " .. tostring(countID) .."));outputChatBox('Destroyed it!')"
setElementData(localPlayer, "object", self)
return self
end
function testDestroy()
local testObject = loadstring(getElementData(localPlayer, "object").destroy)()
end
newElement("test")
testDestroy()
Maybe something like this would suffice your needs?