-
Posts
1,449 -
Joined
-
Last visited
-
Days Won
32
Everything posted by DiSaMe
-
As I said, edit .col file in some collision file editor and replace the collision model. You need to do so because this grass is the property of model.
-
Thanks for the report. I had noticed this error message, but didn't know when it appeared. I've fixed it now.
-
Hey everyone, this is a new version of Drawtag script. The previous version was just a demonstration, this one is really playable. MTA SA 1.3.1 is needed, though (or whatever it is, I don't know exactly, but this script uses dxDrawMaterialLine3D). P. S. On resources forum it says: "UPLOAD YOUR RESOURCES TO THE COMMUNITY CENTER!", is that a rule? Does that mean I can't post my resources there if they're not in community.multitheftauto.com?
-
I think you can modify material of the surface in .col file and import it as a custom collision model.
-
Vehicle health is health of engine and most people can tell the difference between engine and doors So IIYAMA posted the right functions. But there are two more functions: getVehiclePanelState setVehiclePanelState
-
bindKey setPedControlState
-
The problem is in this line: if not ped[p] == nil then Because "not" has higher priority than "==", this line checks if (not ped[p]) is equal to nil. (not ped[p]) can only be true or false, so it will never be equal to nil. Either use: if not (ped[p] == nil) then or simply: if ped[p] then
-
You make setTimer call the function 5 times every 0.5 seconds. That means the function won't be called after 2.5 seconds have passed.
-
Serverside (same as your original code): function createPedForPlayer(thePlayer, command, pedModel) local x,y,z = getElementPosition(thePlayer) local ped = createPed( tonumber(pedModel), x, y, z, 0.0, true) if ped == nil then outputChatBox("Error ped was not created.", thePlayer) return end triggerClientEvent("OnPedWalk", getRootElement(), thePlayer, ped) end addCommandHandler("createPed", createPedForPlayer) Clientside: local ped = {} function makeWalk(thePlayer, thePed) ped[thePlayer] = thePed addEventHandler("onClientElementStreamIn", thePed, makeWalkOnStreamIn) end addEvent("OnPedWalk", true) addEventHandler("OnPedWalk", getRootElement(), makeWalk) function makeWalkOnStreamIn() setPedControlState(source, "walk", true) setPedControlState(source, "forwards", true) removeEventHandler("onClientElementStreamIn", source, makeWalkOnStreamIn) end Because makeWalk is called when the ped is created, it's possible that the ped hasn't streamed in for player and setPedControlState doesn't work. So instead, it should wait until the ped is streamed in (onClientElementStreamIn gets called) and then set control state.
-
Maybe try debugging your code? Like adding outputChatBox into makeWalk to see if the function gets called at all? Edit: I found one more possible reason: On the moment the element is created, it's not streamed in for the player. setPedControlState probably doesn't work on peds which are streamed out. You probably need to set control state in onCilentElementStreamIn.
-
Your code seems to be correct, and I see the reason why the ped doesn't move. You need to set "forwards" control state to true because "walk" only changes the moving speed from running to walking. It has no effect unless the ped moves.
-
bindKey getControlState setPedAnimation
-
I used to script in Notepad++ when I used Windows, but now I use Ubuntu most of the time, so I script in gedit.
-
If you want the object to only be visible for some players, then make it client-side. Then object can be created and destroyed for one player without the same happening for another.
-
I made bone attachments resource and I don't understand what your problem is. detachElementFromBone only leaves element floating because the function does what and only what it says: detaches element from bone. What else do you expect?
-
getElementVelocity setElementVelocity getControlState
-
dxDrawMaterialSectionLine3D...
-
createVehicle createPed warpPedIntoVehicle setPedControlState
-
You can try using: isLineOfSightClear processLineOfSight to detect obstacles. When the obstacle is blocking the way, change ped's direction. That should be enough for a simple obstacle-avoiding AI.
-
He did. He didn't say exactly the same words, but that makes little difference. I've seen topic (it seems to have gone now, though) about MTA vs SAMP video and one sentence from Kye's reply was something like this: "Why not be fair and compare SA-MP 0.2 to some old version of MTA, like DM DP2?" I'm not sure what version numbers those were, but versions compared in the video were the same which he suggested to compare.
-
If he didn't have any hate for MTA, he wouldn't tell lies to people, such as "MTA developers have GTA SA source code" or "this video compares new MTA version to old SA-MP version". So I see nothing wrong about being a "fanboy" because I can't tolerate such propaganda and I want people to know the truth.
-
dxDrawMaterialLine3D dxDrawMaterialSectionLine3D
-
Yeah, we don't provide support for Kye's sect.
-
If the script is client-side, you can also use getElementMatrix instead of getVehicleRotation. But if you don't need to do anything special, just put a light in that position, you don't need to calculate it. Attaching the element with attachElements is enough. Keep in mind, however, that in all these cases you need to set offset coordinates yourself. You can't get them from the game.
-
To detect GTA native objects, you need to use function processLineOfSight.