Jump to content

loadstring


Recommended Posts

Posted
You need to define the sound element in in a variable then use destroyElement...

how to define it with compiled file

you can't ,

but ithink if you used , loop for the element sound , you can destory it ,

- New , Kill System

- New, GameMode Intro

- Leve / Exp System

- New nametag showing style

- New , Hud For Players

- Skin Selection from SA-MP

- Money System / Buy Weapons

- Drop Weapons

- New, Flood System

- New , Group Assign

- Gun license For Weapons

- Random Rule System For Money

Posted
It's the same thing again... redefine the function and keep the handlers in a table then run through it and remove them.

he can't becuase the script is compiled , i dont think it's his ,

he should use loop for sounds , then destroy it ,

- New , Kill System

- New, GameMode Intro

- Leve / Exp System

- New nametag showing style

- New , Hud For Players

- Skin Selection from SA-MP

- Money System / Buy Weapons

- Drop Weapons

- New, Flood System

- New , Group Assign

- Gun license For Weapons

- Random Rule System For Money

Posted
He's using loadstring... you can replace any function you want... that's how lua works you know. I did this myself so i know..

i can but the code is compiled

#~BlackBird~#

Posted
He's using loadstring... you can replace any function you want... that's how lua works you know. I did this myself so i know..

compiled files

Edit any thing will make it not work..

- New , Kill System

- New, GameMode Intro

- Leve / Exp System

- New nametag showing style

- New , Hud For Players

- Skin Selection from SA-MP

- Money System / Buy Weapons

- Drop Weapons

- New, Flood System

- New , Group Assign

- Gun license For Weapons

- Random Rule System For Money

Posted
local soundElements = {} 
local _playSound = playSound 
  
function playSound ( ... ) 
  
    local sound = _playSound ( ... ) 
  
    if sound then 
         table.insert ( soundElements, sound ) 
    end 
  
    return sound 
  
end 
  
loadstring ( codeThatCallsplaySound ) () 

Or in a sandbox:

local soundElements = {} 
local env = deepcopy ( _G ) 
  
function env.playSound ( ... ) 
  
    local sound = playSound ( ... ) 
  
    if sound then 
        table.insert ( soundElements, sound ) 
    end 
  
    return sound 
  
end 
  
local func = loadstring ( codeThatCallsplaySound ) 
setfenv ( func, env ) 
func () 

The implementation of deepcopy can be found here.

I used to know how to code, but then I took an arrow in the knee.

Project Redivivus - Remaking Old School MTA With New Code

MTA 0.6 Nightly 1 released

Posted
He's using loadstring... you can replace any function you want... that's how lua works you know. I did this myself so i know..

compiled files

Edit any thing will make it not work..

Then you simply dont know Lua... look at ixjf's post and learn.

Lua Scripter

?ucet=miki_cz

Owner of mshost.cz MTA portal.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...