-
Posts
6,097 -
Joined
-
Last visited
-
Days Won
218
Everything posted by IIYAMA
-
Get the function extendLine from the stealth resource, to extend the line... Which you probably can find in the main client file from stealth. And don't forget that the z variable is required from getVehicleComponentPosition to make this work.
-
He could try to create all elements in 1 resource. -- RESOURCE A local myElement = nil local elementCustomName = "HelloWorld!" myElement = exports.B.createElementForResource( elementCustomName, -- a custom name for your element, to prevent multiply elements of the same use. createObject, -- the functions you want to execute bla,bla,bla,bla -- arguments ) -- RESOURCE B local customElementNames = {} function createElementForResource(...) if isElement(customElementNames[elementCustomName]) then return customElementNames[elementCustomName] else local data = {...} local elementCustomName = data[1] table.remove(data,1) local functionInUSe = data[1] table.remove(data,1) local element = functionInUSe(unpack(data)) if element then customElementNames[elementCustomName] = element return element end end return false,"Element failed to create." end As long this(B) is the only resource the is running, it will work.
-
Objects that are created by scripting are bounded to the resourceDynamicElementRoot. Once that element is destroyed it will take all his children with him. When you stop a resource, the resourceRoot is destroyed, which means that all children bellow are destroyed too. It works like this: resourceRoot resourceDynamicElementRoot Elements created by scripting getResourceMapRootElement Map elements Wiki: Afaik, you can't edit this with setElementParent. You will have to initialize the elements again once you start it.
-
When you subtract(-) the player position from the ball position, you get the oposide direction vector. When you devide(/) each vector(x, y, z) by the distance between ball and player position, you get a relative direction vector. Which you can multiply(*) by a value of choice to pick the Next moving distance. And the last step is to add(+) the moving distance to the position of the ball. So you know where it is going to end.
-
http://mta.dzek.eu/mmove/
-
A circle becomes smoother when there are pixels with a lower alpha level around it. Those are also known as sub-pixels. The function dxDrawCircle is in my opinion a little bit bad example of drawing dx, because it is executing a MTA function a lot just for 1 circle. The bigger the circle to more it has to execute it. Of course the same problem you will have with images, yet there we talk about 1 execution. You could try to make custom circle textures with: https://wiki.multitheftauto.com/wiki/DxCreateTexture https://wiki.multitheftauto.com/wiki/DxGetPixelColor https://wiki.multitheftauto.com/wiki/DxSetPixelColor + the way dxDrawCircle is created. This way of doing is in the beginning slower by loading, but will catch up within a few seconds. The sub pixels are on the last pixel rings of the process. Yet this will always be a problem as long mta doesn't support svg formats.
-
That doesn't work well with more players and it is using too much bandwidth(because those are "set" and "toggle" functions). toggleControl(thePlayer, "fire", false) toggleControl(thePlayer, "zoom_in", false) toggleControl(thePlayer, "vehicle_fire", false) setElementData(thePlayer, "blood", playerBlood, true)
-
Maybe possible with: setWeaponProperty Using flags. You only know when you try.
-
Ah indeed, I did misread. I thought he mentioned onClientResourceStart.
-
John, This is incorrect. A resource can't start when not all files are there. If that was true, each resource would give a lot of errors while starting.
-
And why didn't you post that part?
-
@barikat You are now committing plagiarism, because you are not mentioning the owner of the podium resource. -- But now about the problem. A resource is not running? (resource: neonapi) That is visible in your debug window. Which can be found here: https://community.multitheftauto.com/in ... ls&id=7068 I have never used this resource, so I do not know if this is the main problem.
-
onClientPlayerWeaponFire is triggers after the bullet has been fired, that's why there is no info on the wiki about cancelEvent. And if it did, these parameters wouldn't make any sense:(hitX, hitY, hitZ, hitElement)
-
I am not pro in strings, but this is what I can do. local testString = "Furkan Ozulus" local stringLength = string.len(testString ) local newString = "" for i=1,stringLength do if math.random(2) == 1 then newString = newString .. string.sub(testString,i,i) else newString = newString .. "_" end if i ~= stringLength then newString = newString .. " " end end outputChatBox(newString)
-
local testString = "Furkan Ozulus" local newString = string.rep("_",string.len(testString )) outputChatBox(newString) Or: local newString = string.rep("_ ",string.len(testString )) outputChatBox(newString)
-
All characters included spaces?
-
For large amount of data, I recommend: triggerLatentClientEvent Else the client might timed-out, triggerClientEvent has a high priority over the MTA network.
-
In my opinion they should release a version within circa 4 months. With that inaccurate date, people have to wait a full year for new features which are already finished. But that is just my opinion.
-
MTA 1.6, Project_train progress Army train carts: FullScreen? FullScreen? Added signal sounds at the level crossings. FullScreen? As well as a horn sound, at crossing places without signal signs. And 50% less CPU usage as I showed before.
- 28 replies
-
- trains
- not compiled
-
(and 2 more)
Tagged with:
-
This is how it should be used. if isElementWithinColShape(vehicle,colshape) then outputChatBox("YES!") else outputChatBox("NO!") end Although empty vehicles have sometimes no syncer.
-
1.6 ready! (this is about the full release) - Fixed train-track bugs. - Optimised. 1 Train. Train streamed IN. Circa 0.68% Client CPU Train streamed OUT. Circa 0.45% Client CPU CPU usage 15 Trains. Thanks to a quick index method, the train locations will be calculated much faster.
- 28 replies
-
- trains
- not compiled
-
(and 2 more)
Tagged with:
-
+ for getting it: getAccounts getAllAccountData
-
Heh? Code better than others? That wouldn't make a difference in not be able to understand it, a foolish conclusion if you ask me. Better code would probably be better to understand. Anyway, is it so hard to bring the word "complexity" up? Or is it just me? There is nothing offending about what I am saying, complex code is just not understandable for most people. Anyway, be happy that it is free...
- 28 replies
-
- trains
- not compiled
-
(and 2 more)
Tagged with:
