Jump to content

Slothman

Retired Staff
  • Posts

    2,963
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Slothman

  1. or you could go ahead and release it, and get the appreciation of the whole community.
  2. are you talking about particle_objects? if you by "effects" you mean particles, you can script a lot of the particles without the need for this resource, but this resource is pretty neat to use still.
  3. try setting a delay timer for 1-2 seconds after the resource starts, instead of doing it right at the resource start. function onResourceStart() setTimer ( replaceSkin , 1234, 1) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart) function replaceSkin() TV = engineLoadTXD ( "skins/285.txd" ) engineImportTXD ( TV, 285 ) end I found this helped skins load more reliably in the past, might help you.
  4. faster zombies are already possible with the resource, and zombies being attracted to gunshots are already part of the zombie script. What I enjoy seeing in zombie servers is goals for players, or missions. Something to do while the zombies are around raher than just have the only activity ingame to be going around and killing zombies. such as: -random supply drops that players have to reach -gather fuel and supplies -rescue trapped survivors (find non zombie peds and save them) -build walls around areas and clear out zombies to reclaim land -drive around in suped up death cars to mow zombies down with
  5. Slothman

    New animation

    The good news, is that sa already has a lot of great animations to go with, you sometimes just need to get a little creative. but the function SetPedAnimationProgress lets you play around with the existing ones too.
  6. except for the population control part of things, you will find a lot of servers already implement sort of what your talking about. It's easy to come up with ideas for your ideal game. If you are passionate about it and want to learn how to make your own gamemode, there is help in irc, the wiki, and this forum. I learned how to script strictly because I kept having great ideas for gamemodes but no way of making it happen, MTA gives us the perfect creativity outlet because it's easy to learn, and extremely flexible with it's scripting options.
  7. UPDATE! fixed the player angle bug workaround to be way way better. don;t know what i was thinking with the old one, it was a long night. now players can jump to their hearts content virtually bug free!!!
  8. Slothman

    Breath

    i'm interested in knowing if this would still have the drowning noises even though the event is cancelled. I know the superman resource prevents drowning when your flying. might be worth seeing how that's done.
  9. there are side strafing animations, have you tried using them?
  10. I think that this was one of the first things done in mta after "glue" was added to be able to attach objects. I'm fairly sure I remember testing it. (and I'm not joking)
  11. wow, looks like fraps really lags your system qaisjp. thanks for putting a video up for metagamer.
  12. Stairs, slopes, ladders, elevators, teleporters, aircraft, all CHUMP ways of getting to the higher ground. Move up LIKE A BOSS with the power of walljumping! This resource allows you to ricochet off walls like a ninja. It is compiled in order to protect it because It is part of a gamemode I am developing that allows players to pick super powers and fight or commit crimes. If you are a good scripter (particularly with gui) and are interested, I am looking to get an equal partner. GET IT HERE BUGS: -there is an MTA bug that makes it so player rotation isn't shown properly while in the air. I worked around this locally, but other people will face the wrong direction sometimes when jumping. -as part of the workaround, players will appear very dark when jumping. I think this just adds to the "ninja effect" -players will no longer want to play on a server that doesn't have this resource. sorry, this can't be helped Thanks to those who helped test it, and keep your eyes peeled for even cooler scripts.
  13. Slothman

    Ped help

    your original script didn't add the zombies to the table, so your script was checking an empty table. btw, i dunno if it matters, but it might be a good idea to use a different table name if your adding that to the zombie resource (myzombies is the name of the table that is used to list the zombies that are chasing a player)
  14. did you make sure you put the client part as a client script in the meta?
  15. rockstar cutting corners. there are ways around this, by keeping a list of coords of different map objects. but that's the whole point of this new feature, if you want to make a vending machine script , you no longer need to know where all the vending machines are
  16. some chairs and world objects are part of a bigger objects like a building or interior. this wouldnt work for that type, but thankfully most chairs are independent objects.
  17. yeah, there are other ways, that was just a suggestion. does valhalla's script work with placed objects only? hate to think i posted this for no reason.
  18. i suppose you could create a gui item that pops up when you rightclick on the item, then make clicking the gui item trigger the server event. not a bad idea, but youd want the gui to dissapear after a few seconds, since aiming is usually right cllick, and it could be annoying to have a gui keep popping up.
  19. for those of you running rpg gamemodes, i thought I might show you something. since it is now possible to see world elements with mta, you can now interact with them pretty easily. this is a quick example of how you can make a player sit on a chair or lay on a bed without having to place mta objects or map out the location of mta world items. This example binds the "b" button to check if a player is looking at a chair or bed (not all chairs are supported, sorry) then puts the player in that chair. This is a crude example because it doesnt test if there is anyone already in the chair, but it shows you what's possible. I'm not releasing this script because its crude and incomplete, and could probably be made more efficient using tables or something, but It might help someone get started. client script: function checkforobject() local x, y, z, lx, ly, lz, roll, fov = getCameraMatrix() local fromX, fromY, fromZ = getElementPosition(getLocalPlayer()) local toX = fromX + (lx - x)*3 local toY = fromY + (ly - y)*3 local toZ = fromZ + (lz - z)*3 local hit, hitX, hitY, hitZ, hitlineElement, normalX, normalY, normalZ, material, lighting, piece, wmid, wmx, wmy, wmz, wmrx, wmry, wmrz = processLineOfSight(fromX, fromY, fromZ+1, toX, toY, toZ, true, false, false, true, false, false, false, true, getLocalPlayer(), true) if hit then if hitlineElement then ix, iy, iz = getElementPosition(hitlineElement) rx, ry, rz = getElementRotation(hitlineElement) elid = getElementModel(hitlineElement) triggerServerEvent ("onworldItemUsed", getLocalPlayer(), elid, ix, iy, iz, rx, ry, rz ) elseif wmid ~= false then triggerServerEvent ("onworldItemUsed", getLocalPlayer(), wmid, wmx, wmy, wmz, wmrx, wmry, wmrz ) end end end bindKey ( "b", "down", checkforobject ) server script: addEvent( "onworldItemUsed", true ) function usetheitem(wmid, wmx, wmy, wmz, wmrx, wmry, wmrz ) if (wmid) then outputChatBox(wmid) end local useditem = getElementData(source, "itembeingused") if isElement(useditem) then setPedAnimation ( source ) setElementData(source, "itembeingused", nil) setElementPosition (source, getElementData(source, "returnx"), getElementData(source, "returny"), getElementData(source, "returnz")) destroyElement(useditem) else local px, py, pz = getElementPosition(source) if wmid == 2291 then setElementData(source, "returnx", px, false) setElementData(source, "returny", py, false) setElementData(source, "returnz", pz, false) local useditemdummy = createObject(wmid, wmx, wmy, wmz, wmrx, wmry, wmrz) setElementData(source, "itembeingused", useditemdummy, false) attachElements(source, useditemdummy, .1, -2.2, 1) --offset will have to be configured for each item setElementRotation(source, 0,0, wmrz-170) -- rotation will have to be configured for each item setElementCollisionsEnabled(useditemdummy, false) setElementAlpha(useditemdummy, 0) setPedAnimation ( source, "TATTOOS", "TAT_Sit_Loop_P", -1, false, false, false, true)-- animation will have to be configured for each item elseif wmid == 2343 then setElementData(source, "returnx", px, false) setElementData(source, "returny", py, false) setElementData(source, "returnz", pz, false) local useditemdummy = createObject(wmid, wmx, wmy, wmz, wmrx, wmry, wmrz) setElementData(source, "itembeingused", useditemdummy, false) attachElements(source, useditemdummy, 2, -.7, .5) setElementRotation(source, 0,0, wmrz-90) setElementCollisionsEnabled(useditemdummy, false) setElementAlpha(useditemdummy, 0) setPedAnimation ( source, "TATTOOS", "TAT_Sit_Loop_P", -1, false, false, false, true) elseif wmid == 2723 then setElementData(source, "returnx", px, false) setElementData(source, "returny", py, false) setElementData(source, "returnz", pz, false) local useditemdummy = createObject(wmid, wmx, wmy, wmz, wmrx, wmry, wmrz) setElementData(source, "itembeingused", useditemdummy, false) attachElements(source, useditemdummy, 0, .5, 1) setElementRotation(source, 0,0, wmrz) setElementCollisionsEnabled(useditemdummy, false) setElementAlpha(useditemdummy, 0) setPedAnimation ( source, "ped", "SEAT_idle", -1, false, false, false, true) elseif wmid == 2724 then setElementData(source, "returnx", px, false) setElementData(source, "returny", py, false) setElementData(source, "returnz", pz, false) local useditemdummy = createObject(wmid, wmx, wmy, wmz, wmrx, wmry, wmrz) setElementData(source, "itembeingused", useditemdummy, false) attachElements(source, useditemdummy, 0, -.5, .6) setElementRotation(source, 0,0, wmrz-180) setElementCollisionsEnabled(useditemdummy, false) setElementAlpha(useditemdummy, 0) setPedAnimation ( source, "ped", "SEAT_idle", -1, false, false, false, true) elseif wmid == 2356 then setElementData(source, "returnx", px, false) setElementData(source, "returny", py, false) setElementData(source, "returnz", pz, false) local useditemdummy = createObject(wmid, wmx, wmy, wmz, wmrx, wmry, wmrz) setElementData(source, "itembeingused", useditemdummy, false) attachElements(source, useditemdummy, 0, .7, 1.1) setElementRotation(source, 0,0, wmrz) setElementCollisionsEnabled(useditemdummy, false) setElementAlpha(useditemdummy, 0) setPedAnimation ( source, "ped", "SEAT_idle", -1, false, false, false, true) elseif wmid == 1761 then setElementData(source, "returnx", px, false) setElementData(source, "returny", py, false) setElementData(source, "returnz", pz, false) local useditemdummy = createObject(wmid, wmx, wmy, wmz, wmrx, wmry, wmrz) setElementData(source, "itembeingused", useditemdummy, false) attachElements(source, useditemdummy, .5, -.7, 1.1) setElementRotation(source, 0,0, wmrz-180) setElementCollisionsEnabled(useditemdummy, false) setElementAlpha(useditemdummy, 0) setPedAnimation ( source, "ped", "SEAT_idle", -1, false, false, false, true) elseif wmid == 1762 then setElementData(source, "returnx", px, false) setElementData(source, "returny", py, false) setElementData(source, "returnz", pz, false) local useditemdummy = createObject(wmid, wmx, wmy, wmz, wmrx, wmry, wmrz) setElementData(source, "itembeingused", useditemdummy, false) attachElements(source, useditemdummy, .5, -.7, 1.1) setElementRotation(source, 0,0, wmrz-180) setElementCollisionsEnabled(useditemdummy, false) setElementAlpha(useditemdummy, 0) setPedAnimation ( source, "ped", "SEAT_idle", -1, false, false, false, true) elseif wmid == 2290 then setElementData(source, "returnx", px, false) setElementData(source, "returny", py, false) setElementData(source, "returnz", pz, false) local useditemdummy = createObject(wmid, wmx, wmy, wmz, wmrx, wmry, wmrz) setElementData(source, "itembeingused", useditemdummy, false) attachElements(source, useditemdummy, .5, -.7, 1.1) setElementRotation(source, 0,0, wmrz-180) setElementCollisionsEnabled(useditemdummy, false) setElementAlpha(useditemdummy, 0) setPedAnimation ( source, "ped", "SEAT_idle", -1, false, false, false, true) elseif wmid == 2124 then setElementData(source, "returnx", px, false) setElementData(source, "returny", py, false) setElementData(source, "returnz", pz, false) local useditemdummy = createObject(wmid, wmx, wmy, wmz, wmrx, wmry, wmrz) setElementData(source, "itembeingused", useditemdummy, false) attachElements(source, useditemdummy, -.5, 0, .3) setElementRotation(source, 0,0, wmrz-270) setElementCollisionsEnabled(useditemdummy, false) setElementAlpha(useditemdummy, 0) setPedAnimation ( source, "ped", "SEAT_idle", -1, false, false, false, true) elseif wmid == 1708 then setElementData(source, "returnx", px, false) setElementData(source, "returny", py, false) setElementData(source, "returnz", pz, false) local useditemdummy = createObject(wmid, wmx, wmy, wmz, wmrx, wmry, wmrz) setElementData(source, "itembeingused", useditemdummy, false) attachElements(source, useditemdummy, .5, -.7, 1.1) setElementRotation(source, 0,0, wmrz-180) setElementCollisionsEnabled(useditemdummy, false) setElementAlpha(useditemdummy, 0) setPedAnimation ( source, "ped", "SEAT_idle", -1, false, false, false, true) elseif wmid == 1713 then setElementData(source, "returnx", px, false) setElementData(source, "returny", py, false) setElementData(source, "returnz", pz, false) local useditemdummy = createObject(wmid, wmx, wmy, wmz, wmrx, wmry, wmrz) setElementData(source, "itembeingused", useditemdummy, false) attachElements(source, useditemdummy, .5, -.7, 1.1) setElementRotation(source, 0,0, wmrz-180) setElementCollisionsEnabled(useditemdummy, false) setElementAlpha(useditemdummy, 0) setPedAnimation ( source, "ped", "SEAT_idle", -1, false, false, false, true) elseif wmid == 1739 then setElementData(source, "returnx", px, false) setElementData(source, "returny", py, false) setElementData(source, "returnz", pz, false) local useditemdummy = createObject(wmid, wmx, wmy, wmz, wmrx, wmry, wmrz) setElementData(source, "itembeingused", useditemdummy, false) attachElements(source, useditemdummy, -.5, 0, .3) setElementRotation(source, 0,0, wmrz-270) setElementCollisionsEnabled(useditemdummy, false) setElementAlpha(useditemdummy, 0) setPedAnimation ( source, "ped", "SEAT_idle", -1, false, false, false, true) elseif wmid == 2090 then setElementData(source, "returnx", px, false) setElementData(source, "returny", py, false) setElementData(source, "returnz", pz, false) local useditemdummy = createObject(wmid, wmx, wmy, wmz, wmrx, wmry, wmrz) setElementData(source, "itembeingused", useditemdummy, false) attachElements(source, useditemdummy, 2, 2, 1) setElementRotation(source, 0,0, wmrz+90) setElementCollisionsEnabled(useditemdummy, false) setElementAlpha(useditemdummy, 0) setPedAnimation ( source, "INT_HOUSE", "BED_In_R", -1, false, false, false, true) elseif wmid == 2298 then setElementData(source, "returnx", px, false) setElementData(source, "returny", py, false) setElementData(source, "returnz", pz, false) local useditemdummy = createObject(wmid, wmx, wmy, wmz, wmrx, wmry, wmrz) setElementData(source, "itembeingused", useditemdummy, false) attachElements(source, useditemdummy, 2, 2, 1) setElementRotation(source, 0,0, wmrz+90) setElementCollisionsEnabled(useditemdummy, false) setElementAlpha(useditemdummy, 0) setPedAnimation ( source, "INT_HOUSE", "BED_In_R", -1, false, false, false, true) elseif wmid == 1798 then setElementData(source, "returnx", px, false) setElementData(source, "returny", py, false) setElementData(source, "returnz", pz, false) local useditemdummy = createObject(wmid, wmx, wmy, wmz, wmrx, wmry, wmrz) setElementData(source, "itembeingused", useditemdummy, false) attachElements(source, useditemdummy, 2, 2, 1) setElementRotation(source, 0,0, wmrz+90) setElementCollisionsEnabled(useditemdummy, false) setElementAlpha(useditemdummy, 0) setPedAnimation ( source, "INT_HOUSE", "BED_In_R", -1, false, false, false, true) end end end addEventHandler ( "onworldItemUsed", getRootElement(), usetheitem )
  20. I make no promises, but I'll try to patch up slothbot this weekend.
  21. I think we all learned that the MTA forums isn't the best place to go for suicide prevention. topic closed. ps: cheer up, the internet, like highschool, isn't part of the real world.
  22. he actually tried to upload zombies as his own. way to get the wrong guy's attention, hes gone.
  23. nice recap video. good job spreading the gospel
×
×
  • Create New...