-
Posts
535 -
Joined
-
Last visited
-
Days Won
9
Everything posted by thisdp
-
because of "setfenv" And also, I recommend you to learn LUA weak table if you don't know.
-
wind = dgsCreateWindow(0.2*sW,0,0.4*sW,0.4*sH,"Example Scroll Pane (exclude this window)",false) pane = dgsCreateScrollPane(20,0,200,200,false,wind) dgsScrollPaneSetScrollBarState(pane,false) scrollbar = dgsCreateScrollBar(0,0,20,180,false,false,wind) dgsSetProperty(scrollbar,"theScrollPane",pane) dgsSetProperty(scrollbar,"functions",[[ local scb = dgsScrollPaneGetScrollBar(dgsElementData[self].theScrollPane)[1] dgsElementData[self].multiplier = dgsElementData[scb].multiplier dgsElementData[self].length = dgsElementData[scb].length ]]) addEventHandler("onDgsScrollPaneScroll",pane,function(vertical) dgsScrollBarSetScrollPosition(scrollbar,vertical) end) addEventHandler("onDgsScrollBarScrollPositionChange",scrollbar,function(value) local scbs = dgsScrollPaneGetScrollBar(pane) dgsScrollBarSetScrollPosition(scbs[1],value) end) gdlt = dgsCreateImage(0.5,0,1.1,1.1,_,true,pane,tocolor(255,255,255,255)) gdlt2 = dgsCreateImage(0.1,0,0.7,0.7,_,true,pane,tocolor(0,255,255,255)) With the latest DGS, this is an example to handle your situation.
-
The first "print" prints "function" The second "print" prints "nil" I am afraid that you didn't test my code. If you think it is false without test, then it is false anyway. I don't care.
-
No need to unload, because the variables won't affect the _G table, this means everything is "local" which will be marked by garbage collector after they are useless (If you know how lua garbage collector works you will understand what I have said). The code has passed my test. In terms of your request, the code works. For the "local" variables, there is no way to get their name unless they are "global".
-
i am working on a new function to solve your question. As soon as the new function finishes, i will post the method to realize what you want. thanks for your supports.
-
local buffer = [[local sx, sy = 0, 0 globalVar = 'test string' function testFunction() end local function testFunction2() end]] buffer = buffer:gsub("local","") local fnc = loadstring(buffer) local gTable = {} setmetatable(gTable,{__index=_G}) setfenv(fnc,gTable) fnc() for k,v in pairs(gTable) do print(k,v) end
-
because "listaEmpregos" is a local variable in function "MarkerHit"
-
why not outputChatBox(selected) ?
-
watch your debug message. about the "DGS" perfix: DGS = exports.dgs is always used. But i recommend you to use this instead loadstring(exports.dgs:dgsImportFunction())()-- load functions label = dgsCreateLabel(0,0,0.5,0.1,"text",true) --create a label
-
dgsSetProperty(progressbar,"bgColor",tocolor(r,g,b,a)) dgsSetProperty(progressbar,"indicatorColor",tocolor(r,g,b,a))
-
Ah, i am wrong.. After thinking for a while, i found the algorithm is a little bit complicated..
-
Tell you the truth, getDistanceBetweenPoints2D and findRotation doesn't work accurately in this case.
-
addCommandHandler("test",function(player,command,...) local args = {...} print(#args) --How many arguments are passed end)
-
Ah..
-
Because onDgsMouseClick triggers twice when you click a button, press and release
-
DGS is a resource, all the functions provided are exported.
-
If you use dgs, then detect area is ready for you. It uses dxGetTexturePixels, but optimized.
-
Delorean Time Machine Script or How can you do it?
thisdp replied to damianj457's topic in Scripting
Ah.. It is not too difficult for a scripter -
Tell you the truth.. The slowest part may be the dx functions..
-
Delorean Time Machine Script or How can you do it?
thisdp replied to damianj457's topic in Scripting
I rewrote the script by myself according to the BTTFHV team's server. -
Delorean Time Machine Script or How can you do it?
thisdp replied to damianj457's topic in Scripting
Are you seeking for this? This is my unfinished BTTF script https://m.youtube.com/watch?v=G6bhcaF0I_A -
what about onClientPreRender?
-
if getVehicleComponentRotation = handlingGetSteeringLock then To if getVehicleComponentRotation == handlingGetSteeringLock then But, your code still seems to be incorrect logically.