Jump to content

j3sus86

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by j3sus86

  1. yet you all complain that they come here to use mta's map editor. should think of it as an opportunity for them to see mta's potential.
  2. thank you it works! I've had this script for ages that only half worked. I actually have a few other scripts that i have similar problems with hopefully i can figure it out based on this. I really appreciate both of your efforts and time. function setVelocityRelativeToVehicle(vehicle, direction, increaseFactor) local M = getElementMatrix( vehicle ) local velx,vely,velz = getElementVelocity(vehicle) local X,Y,Z = 0,0,0 if direction == "front" then Y = increaseFactor elseif direction == "rear" then Y = -increaseFactor elseif direction == "left" then X = -increaseFactor elseif direction == "right" then X = increaseFactor else outputDebugString("unknown direction: " .. tostring(direction)) end setElementVelocity( vehicle, velx + X * M[1][1] + Y * M[2][1] + Z * M[3][1], vely + X * M[1][2] + Y * M[2][2] + Z * M[3][2], velz + X * M[1][3] + Y * M[2][3] + Z * M[3][3] ) end
  3. correct, and it works if the vehicle is right side up, using only on the z rotation. But x and y rotations need to be taken into account and I'm not sure of the math to do so.
  4. need help with some math if anyone is good at it. The solution is probably simple, but I'm not good at it. -- need to check rotX and rotY to see if the vehicle is upside down to get the correct velocity to move the vehicle front, rear, left, right.. -- when the vehicle is upside down /tilted, the wrong velocities are returned function getVelocityRelativeToVehicle(vehicle, direction, increaseFactor) local velocityX,velocityY,velocityZ = getElementVelocity(vehicle) local rotX,rotY,rotZ = getVehicleRotation(vehicle) if direction == "front" then rotZ = rotZ elseif direction == "rear" then rotZ = rotZ + 180 elseif direction == "left" then rotZ = rotZ + 90 elseif direction == "right" then rotZ = rotZ - 90 else outputDebugString("unknown direction: " .. tostring(direction)) end -- need to check rotX and rotY to see if the vehicle is upside down to get the correct velocity to move the vehicle front, rear, left, right.. -- when the vehicle is upside down /tilted, the wrong velocities are returned rotZ = math.rad(rotZ) velocityX = (math.sin(rotZ) * -increaseFactor) + velocityX velocityY = (math.cos(rotZ) * increaseFactor) + velocityY return velocityX, velocityY, velocityZ end
  5. that doesn't really help much, i need help with the math to calculate the offset to use with attachElementToElement(). thx for trying though.
  6. that doesn't really help much, i need help with the math to calculate the offset to use with attachElementToElement(). thx for trying though.
  7. I'm trying to make paintballs, that attach to a vehicle or player at the point where the bullet hit. I'm not so good at math, but i tried to base it off the glue resource, using his method of attaching at the correct offsets. I don't understand the math involved and it not working correctly. All the paintballs seem to stick to the center area of the vehicle. Any help would be much appreciated. http://mta.pastebin.com/d2f62213c
  8. I'm trying to make paintballs, that attach to a vehicle or player at the point where the bullet hit. I'm not so good at math, but i tried to base it off the glue resource, using his method of attaching at the correct offsets. I don't understand the math involved and it not working correctly. All the paintballs seem to stick to the center area of the vehicle. Any help would be much appreciated. http://mta.pastebin.com/d2f62213c
  9. Auto-Complete player name and Vehicle Name from a sub string Well I'm new to lua but i made these and i figured they might be useful to someone.. Sorry in advance if its coded poorly but i tried. -- Completes Player Name From A Sub String -- returns for the last match found: player, theName, and number of matches found function complete_PlayerName ( sub ) local players = getElementsByType ( "player" ) sub = string.lower(sub) local success, target local numfound = 0 for theKey, theFind in ipairs(players) do success = string.find(string.lower(getClientName ( theFind ) ), sub ) if success then target = theFind numfound = numfound + 1 end end return target, getClientName(target), numfound end -- Completes Vehicle Name From A Sub String -- returns the last match found: Name of Vehicle, number of matches, modelid function complete_VehicleName ( sub ) local success, target, model local numfound = 0 sub = string.lower(sub) for i = 1, 211 do if ( getVehicleNameFromID ( 400 + i ) ~= "" ) then success = string.find(string.lower(getVehicleNameFromID ( 400 + i ) ), sub ) if success then target = getVehicleNameFromID ( 400 + i ) numfound = numfound + 1 model = 400 + i end end end return target, numfound, model end -- Example of how its used function Cmd_Vname( thePlayer, command, sub ) local theVehicleName, numfound, modelid = complete_VehicleName ( sub ) if not theVehicleName then outputChatBox ( "no matches found: (" .. sub .. ").", thePlayer ) else if numfound > 1 then outputChatBox ( "multiple matches found (" .. numfound .. "). Please be more specific", thePlayer ) else outputChatBox ( "Vehicle Found: " .. theVehicleName .. " (" .. modelid .. ").", thePlayer ) end end end addCommandHandler("vname", Cmd_Vname) Edit - added weapon name autocomplete -- Completes Weapon Name From A Sub String -- returns for the last match found: name, weaponid, number of matches function complete_WeaponName ( sub ) local success, target, weaponid local numfound = 0 sub = string.lower(sub) for i = 1, 46 do if ( getWeaponNameFromID ( i ) ~= false )then success = string.find(string.lower(getWeaponNameFromID ( i ) ), sub ) if success then target = getWeaponNameFromID ( i ) numfound = numfound + 1 weaponid = i end end end return target, weaponid, numfound end
  10. i agree!! been mentioned and i think aeron is workin on it : ) so hopefully we'll see it soon.
  11. hmm well i was workin on a cops and robber map and was wondering if there is anyway to specify which spawnpoints will respawn first? for example making it where spawnpoints for a robber would respawn first to make sure there is always a robber instead of running into the problem of all cops. Is it decided by which spawn points come first in the .map file? closest spawn point to where a player dies? any info would be much appreciated. sry if it has already been mentioned, i searched with no sucess. *edit* (only saw some info about initial spawn points not respawning) thx another question is about the pickups & icons such as bodyarmor(1242) and parachute(1310) and cj_m16 (2035). will these be the pickups used once dm is finished? was working on a map and had a cool idea for dm, just was wonderin if thats what would be used to know if i should bother workin on it or not. thx again : )
  12. j3sus86

    M!C PipeDream Video

    cool map cool video
  13. being able to group objects in map maker would be good also, dunno if it has been mentioned, sry if it has.
  14. i dunno how but might start googlin : )
  15. we need to get some ppl together in a server and pose for some screenshots to use to make the banner, So instead of trying to put 15 images together for a banner, we take like 4 or 5 posing how we want, showing everything possible in mta:sa, lots of cars, planes, helis, bikes, etc. Then do the same for mta:vc and gta3 and whoalla we would have some good screens to work with, its also important to take them on a comp with high rez and high quality video settings and get some good images for the banner. i dunno just an idea, i would be up for it if anyone else wants to or thinks its worth the effort. get some new screens to fool around with. : ) pm me or respond if u wanna help me get this together.
  16. i agree, a favorites section would be a good idea as well as maybe a history/recent servers joined section. keep up the great work mta team : ) im lovin it.
  17. i used some of ur ideas and heres how it turned out... if i could only make the banner a little larger it would make the whole border thing easier as well as including more images. here it is with no border here it is with border here is how it looks on site template with the border http://img470.imageshack.us/img470/5566 ... der9yf.jpg looks good brophy
  18. i started over with the same basic idea just took tags out of images and using a few different images. Now that i know how to blend again it should look much better. i hadnt used photohop in like 2 years and was kinda relearning as i was going. will post a pic soon. i agree, left side needs some work (mainly the 2nd two images) right side looks pretty cool so i will mainly work on left side and will include more group pics, but i think the explosions and him dying on the right look pretty cool next to eachother. im also working on a border that kinda fades to blue, any chance i can get a rgb or hex of the color used on new site?
  19. would i need to take health bars out too or just names?
  20. still work in progress, not quite what i want what else should i do to it. lemme know what u think.
  21. having trouble making anything that looks good with these screen shots, but if i can i will post psd for the Multi Theft Auto text and people can try their luck and use it if they want.
  22. lol i was just typing a post asking for pictures! beat me to the punch.. ill work on the pic tonight. thx alot post a few more san andreas screens if u have any good ones
  23. heh havent fooled around in photoshop for a while, but heres what i made.
×
×
  • Create New...