Jump to content

Revolt

Members
  • Posts

    113
  • Joined

  • Last visited

Everything posted by Revolt

  1. 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.
  2. Revolt

    DX Help!

    dxGetTextWidth dxGetFontHeight Use these.
  3. Project = {} Did you declare a table?
  4. 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.
  5. 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.
  6. @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.
  7. 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.
  8. 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.
  9. 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*
  10. CTRL+F "reload"? It matches 13 animations.
  11. 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.
  12. -- 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.
  13. for _, k in ipairs ( acls ) do I think this should be ipairs instead of pairs.
  14. 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?
  15. You are using the index instead of clothing type. addPedClothes (CJ,"hawaiired","hawaii",0) -- not 59 -- and so on...
  16. isObjectInACLGroup(..) is server-sided.
  17. local screenX, screenY = guiGetScreenSize() local width = dxGetTextWidth("Test Text", 2) local height = dxGetFontHeight(2) local completion = 0 local function prerender(deltaTime) if (completion < 1) then completion = completion + deltaTime / 3000 -- It'll take 3 seconds to scroll the text to the edge of the screen end end addEventHandler("onClientPreRender", root, prerender) local function render() local x, y = interpolateBetween(0, 0, 0, screenX - width, screenY - height, 0, completion, "Linear") -- [url=https://wiki.multitheftauto.com/wiki/Easing]https://wiki.multitheftauto.com/wiki/Easing[/url] dxDrawText("Test Text", x, y, width, height, 0xFFFFFFFF, 2) end addEventHandler("onClientRender", root, render) This is an example how you can use interpolateBetween (..) for the intro scroll. I guess for bouncing that you could use sine of time since execution (you can create a variable and add delta time to it each pre-render event).
  18. Yes. BTW, it is normal that it confuses people, since they cannot know whether tonumber(..)'s arguments are passed by reference or value.
  19. outputServerLog(regenmmPerUur) if (tonumber(regenmmPerUur) < 1) then It should be implemented like this.
  20. tonumber(..) should work. You see that the error line is not anymore on the 13th line when you implement it?
  21. local orientation = -1 -- left is -1, right is 1 local veh = getPedOccupiedVehicle(getLocalPlayer()) local x, y, z = getElementPosition(veh) local _, _, r = getElementRotation(veh) x = x + 4 * math.cos(math.rad(r)) * orientation y = y + 4 * math.sin(math.rad(r)) * orientation createProjectile(veh, 19, x, y, z, 1, nil, 0, 0, 0, math.cos(math.rad(r)) * orientation, math.sin(math.rad(r)) * orientation) Maybe this'll work.
  22. Revolt

    Duty command

    function duty (playerSource) local acc = getPlayerAccount ( playerSource ) if (acc and not isGuestAccount(acc)) then if isObjectInACLGroup ( "user.".. getAccountName ( acc ), aclGetGroup ( "Admin" ) ) then setElementData(playerSource,"duty",not getElementData(playerSource,"duty")) else outputChatBox("You're not an Admin!", playerSource) end else outputChatBox("You're not logged it!", playerSource) end end addCommandHandler("duty",duty)
  23. Revolt

    Duty command

    function duty (playerSource) local acc = getPlayerAccount ( playerSource ) if (acc and not isGuestAccount(acc)) then if isObjectInACLGroup ( "user.".. getAccountName ( acc ), aclGetGroup ( "Admin" ) ) setElementData(playerSource,"duty",true) outputChatBox("It works", playerSource) else setElementData(playerSource,"duty",false) outputChatBox("You're not an Admin!", playerSource) end else outputChatBox("You're not logged it!", playerSource) end end addCommandHandler("duty",duty) Try this.
×
×
  • Create New...