-
Posts
6,097 -
Joined
-
Last visited
-
Days Won
218
Everything posted by IIYAMA
-
Some can work with tables and some (aymeness81) people can't,
-
You created an infinity, that never got killed. Players are going to be rich forever even if he started another job. After the player leaves, the playersb don't exist and your server got filled up with erros. etc.
-
Something that have to fit in the other code..... I don't define mon cause it is in his own function, so if that is within his function block there is no reason to define it in my code. It will remain local with the timer till the timer stops.
-
setTimer( givePlayerMoney, 1200000, 300, playersb, mon ) 1200000 / 1000 = 1200 sec 1200 / 60 = 20 minutes timer This is amount is correct? local bodyGuardTimers = {} bodyGuardTimers[playersb] = setTimer(function () if isElement(playersb) then givePlayerMoney( playersb, mon ) outputChatBox("Here is your payement.You can continue protecting to earn more. You got $ "..mon, playersb, 255, 255, 0 ) else local timer = bodyGuardTimers[playersb] if isTimer ( timer ) then killTimer ( timer ) end bodyGuardTimers[playersb] = nil end end,1200000, 300)
-
np. Good luck with your script.
-
You can try to use: setElementPosition(element,getElementPosition(element)) after you detach it.
-
attached at serverside?
-
It must work unless it got overwritten. Note: After you set the vehicle handling only new vehicles will have this, not the old ones.
-
It must be false
-
https://wiki.multitheftauto.com/wiki/GetLowLODElement -- after you created the same object. https://wiki.multitheftauto.com/wiki/GetElementModel https://wiki.multitheftauto.com/wiki/RemoveWorldModel
-
Search by name of the object you just destroyed. Maybe this object shares some of the same name parts.
-
any errors? /debugscript 3
-
This is how I script this: local imageTable,renderImage = {},false local move_image move_image = function() for element,data in pairs(imageTable) do if isElement(element) then local x1 = data.from_x if(x1<=x) then data.from_x = x1 + data.speed else imageTable[element]= nil end else imageTable[element]= nil end end if not next(imageTable) then removeEventHandler('onClientRender',root,move_image) renderImage = false end end function DGTAnimateStaticImage(Element,from_x,speed) imageTable[Element] = {from_x = from_x,speed = speed} if not renderImage then addEventHandler('onClientRender',root,move_image) renderImage = true end end You can delete images every single moment you want and the render function will stop when there isn't anything to render. imageTable[element]= nil
-
What is wrong with table mode? What is wrong with writing directly to the ram? It can't be faster can it? Tables can do everything, even stop things. There is and function called: https://wiki.multitheftauto.com/wiki/IsElement Loop through the table and when you notice the element is gone you can simply remove it from the table. setElementData is a function a table isn't, so use local tables or data ...... they almost don't have any delays/lagg.
-
That is lots of time my friend, I just told you what is wrong. If you can't speak/write English then you should ask this at your own section. Because fixing cost time, when I over see a bug it would be a waste of my time cause of the bad communication. "I'm very very bad english." Are you 'bad' English? O_o I still don't understand how you can write English code when your English is that bad.
-
There is nothing wrong with this.
-
Is the colshape still intact? and what does debugscript 3 say?
-
as far I know this script would remove every object within the colshape setTimer(function() local shape1 = getElementsWithinColShape(moneyShape1) for index, p in ipairs(shape1) do if getElementModel(p) == 2935 or 2934 then destroyElement(p) end end end,50,0) remains always true, so if colshape did exist, then all elements would be destroyed. You also would have an error/warning for trying to destroy player elements. This can be written like this: local model = getElementModel(p) if model == 2935 or model == 2934 then But I will recommend this: local trueModels = {[2935]=true,[2934]=true} setTimer(function() local shape1 = getElementsWithinColShape(moneyShape1) for index, p in pairs(shape1) do if trueModels[getElementModel(p)] then destroyElement(p) end end end,50,0)
-
Change them to strings, it is the only way to secure their passages. I am not sure if you create a projectile and the projectile that I see on my screen contains the same userdata.
-
https://wiki.multitheftauto.com/wiki/GetProjectileType addEventHandler ( "onClientProjectileCreation", root, function( creator ) local projType = getProjectileType(source) end)
-
np. I wrote this because many forum users are abusing my attention or steal scripts, sorry for that but that was just for assurance.
