-
Posts
6,086 -
Joined
-
Last visited
-
Days Won
215
Everything posted by IIYAMA
-
Yea, vector formats would be great. It must be possible, there are plugins for lua. But mta must support it too.
-
"insanity" Try me on another forum. I already helped you on another topic, "with scripting", but I am not going to help you with this. This topic should not be here, it is annoying and it makes starters follow your behaviour, which is a bad habit. If I wanted to help you with this problem, I would go to the request section. I am not only speaking for myself but also for many scripters who have the same opinion about this. Got it? You are 15 years old(if it is valid), this must not be too hard to understand for you.
-
Serverside get triggerClientEvent or setElementData(resourceRoot, Client getElementData(resourceRoot,
-
Nobody helps a nobody, it suits one of your comments. Except you are wrong about that, many people have tried and you just wasted their time. I never called you that anyway, you are only acting like one. It is a shame that you have to make a joke out of it. Just try to understand why they don't give the answers you want and why people reply negative comments on annoying and wrong placed posts like this.
-
Pardon? You really think I am that stupid? Nobody wants to write your code unless they are as stupid as your dog. If you want that, you should start paying people or trading with them. You can trade with maps(home made) <> scripts(home made) <> userwork(home made) etc. and if you have nothing to trade, you are a nobody. Nobody can help a "nobody". BUT THIS IS NOT A SECTION FOR THAT, THIS IS FOR HELPING WITH SCRIPTING AND YOU ARE NOT INTERESTED IN THAT. YOU JUST WANT YOUR CODE THAT'S ALL.
-
local tableRange = 0 for key,data in pairs(test.test2) do tableRange = tableRange+1 end outputChatBox(tableRange) Tables without using the array can't use #. If this table had an array it would only have numbers as index.
-
WRONG SECTION Seriously when do people read the basic rules. Something wrong with you yoya?
-
You are doing the same. -_-" There is no account data on clientside. if Rank then local lvl = getElementData(localPlayer, "Level") if lvl then dxDrawImage((210/1024)*sWidth, (738/768)*sHeight, (31/1024)*sWidth, (31/768)*sHeight, ":bla2/ranks/lvl_" .. tostring(lvl) .. ".png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end else local lvl = getElementData(localPlayer, "Level") if lvl then dxDrawImage((210/1024)*sWidth, (738/768)*sHeight, (31/1024)*sWidth, (31/768)*sHeight, ":bla2/ranks/lvl_" .. tostring(lvl) .. ".png", 0, 0, 0, tocolor(255, 255, 255, 255), true) end end
-
You can't guarantee that the player always carries element data. if lvl then anyway line 5 has no access to that variable.
-
You can also prevent the explosions of the vehicles, but this will not prevent them to be able blown. https://wiki.multitheftauto.com/wiki/OnClientExplosion You can cancel: 4: Car 5: Car Quick 6: Boat 7: Heli local cancelTheseTypes = { [4]=true, [5]=true, [6]=true, [7]=true } addEventHandler("onClientExplosion",root, function (x,y,z,theType) if cancelTheseTypes[theType] then cancelEvent() end end) Note: sometimes heli/planes explode using the rocket explosion. (happens when they are already exploded and they get rammed/hit by anything.
-
I found one example: https://wiki.multitheftauto.com/wiki/Ma ... g_Matrices and I already had found the classes: https://wiki.multitheftauto.com/wiki/Matrix But mta source code, I have never looked in to that. Where can I place this location of yours?
-
There are not examples for that on the wiki, only that they do exist.
-
It never gives an error, unless it has been destroyed by another script.
-
well you have to change the offset to what you want. You can also do this: local offX,offY,offZ = getPositionFromElementOffset(car,5,0,0) local offX2,offY2,offZ2 = getPositionFromElementOffset(car,0,5,0) setCameraMatrix(offX,offY,offZ,offX2,offY2,offZ2) Which makes it possible to attach the camera in every position you want. and if you want to rotate the camera when it is attached to the vehicle. See wiki example: https://wiki.multitheftauto.com/wiki/GetCamera cam = getCamera() setElementPosition( cam, 0,0,0 ) -- Clear camera target myVehicle = getPedOccupiedVehicle(localPlayer) attachElements( cam, myVehicle, 0,-4,2, -20,0,0 )
-
offset = not the car position....... offset is the offset you want to set from the car it self. The car position is already within the matrix of the car. function cam () local x,y,z = getElementPosition(car) local offX,offY,offZ = getPositionFromElementOffset(car,5,0,0) -- 5 units offset at the X as. setCameraMatrix(offX,offY,offZ,x,y,z) -- facing the car. end
-
wut? If this isn't what you want, explain better. If you do not understand what these lines do, ask me how they work. and anyway explain it better, I am at the moment only gambling how you want this cam.
-
You can better ask this question on the dutch section or at the resource section. Deze sectie is niet bedoeld voor resources, je kan het beter vragen in de Nederlandse sectie of in de resources sectie. Slechte Engelse lerares? (ik leef met je mee....)
-
https://wiki.multitheftauto.com/wiki/GetElementMatrix function getPositionFromElementOffset(element,offX,offY,offZ) local m = getElementMatrix ( element ) -- Get the matrix local x = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1] -- Apply transform local y = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2] local z = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3] return x, y, z -- Return the transformed point end Get your offset and put your camera on it. Be creative.
-
@toxicsmoke11 Yes that is a bug, but that won't matter so much because the rounded numbers are accurate enough. Also by not doing that(not convert to string), it saves you some bandwidth. @Feche1320 I think it is more a kind of streamed in bug. I have a sort of similar bug: When I attach an object(with disable col) to my car. It will only be visible when I start driving. (before moving it is only at the position I created it) What if you force them to be not stream able and enabled that later? https://wiki.multitheftauto.com/wiki/Se ... Streamable It would be a logic explanation.
-
Help yourself. Debug it using debug strategies. Wiki can help you, I can't.
-
1: Use setElementAlpha instead of setObjectScale. 2: isInvisible table makes no sense, just use a boolean. local isInvisible = true local isInvisible = false 3: "onClientPlayerJoin" makes no sense, this is only for other players to join. Not for the localPlayer. 4: loop through the players at line 51, doesn't make sense. 6: "onClientMapStarting" is a custom race event, don't you need to enable it? addEvent("onClientMapStarting",true)
-
Does that mean you don't have to try it? I don't think so. As long as you try things there are alway People to correct you and at the end you have your script and learnt from it. If there are things you don't understand, I expect you to ask them and not that you say that you can't do it because that is wasting my time.
-
setPedAnimation(source,false) 2 seconds is 2000 ms not 5000 ms.
-
What do you mean with nothing? You are the one who needs to debugging it, show me the debug results. and it is stupid to use the same debug text all over the script, you need to write what happens there. Not just copy my text, so you don't know what part of the code get executed. Don't forget the /debugscript 3