-
Posts
6,063 -
Joined
-
Last visited
-
Days Won
209
Everything posted by IIYAMA
-
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.
-
yes, but he define it: function assignNewTeam ( source, _, playername, teamname ) I would have written it as player, because a source can be a lot.
-
A sample how you can do it: local tickCount = 0 addCommandHandler("hey", function() if getTickCount() - tickCount >= 1000 then outputChatBox("hey") tickCount = getTickCount() end end)
-
WIKI getTickCount Client and Server function This function returns amount of time that your system has been running in milliseconds. By comparing two values of getTickCount, you can determine how much time has passed (in milliseconds) between two events. This could be used to determine how efficient your code is, or to time how long a player takes to complete a task. Clear?
-
You probably right, Then it seems he is at the wrong forum, let him use sa-mp editor if it ever exist. Stupid sa-mp users, I still don't understand why they play sa-mp, it triple sucks, it laggs like hell, low security for hackers, sa-mp scripting fails and they are using mta editor for their own benefit. thieves...
-
Why don't you quit gta san, it is boring.
-
I just did, you scripted that, then it won't be hard to add these few lines. else it isn't your script. ("motax: I just made a script") Good luck
-
Note: the player can leave while the timer is running. = warning/error setTimer (function () if isElement(source) then setControlState (source, "forwards", false) toggleAllControls (source, true) end end, 10000, 1) The source can be used with in the timer-function, the data stays within the block. It will be erased after everything has ended within the block. Block Btw: make sure there is an event else probably there won't be a source.
-
https://wiki.multitheftauto.com/wiki/GetTickCount local tickCount = 0 if getTickCount() - tickCount >= 1000 then tickCount = getTickCount() end Recommended to use this on client side cause of the trigger, it will save you some bandwidth.