Jump to content

Flashmyname

Members
  • Posts

    39
  • Joined

  • Last visited

  • Days Won

    2

Flashmyname last won the day on March 10 2024

Flashmyname had the most liked content!

1 Follower

Details

  • Interests
    IT Network Systems Administration & Security / Cybersecurity Engineering

Recent Profile Visitors

2,884 profile views

Flashmyname's Achievements

Rat

Rat (9/54)

10

Reputation

  1. Mine's just a resource, runs on stable 1.6, you drop it on your server and that's it. MTA:NEON is a fork. Bit of a difference.
  2. Sunrise over San Fierro. - Quick sneak peek on Patreon on what's been going on lately.
  3. Same spot, same time, same weather. Lighting off / on. https://streamable.com/kl2mi3
  4. Been a while. - More info coming soon.
  5. Creating immersive visual effects in MTA with custom lighting and more! If you're interested, find out more information about the project on my Patreon! https://www.patreon.com/posts/project-aurora-115081763?utm_medium=clipboard_copy&utm_source=copyLink&utm_campaign=postshare_creator&utm_content=join_link
  6. Nevermind, figured it out in the end.
  7. But it's also ruining it somehow, because player cannot be set back to it's root, because the way my script works, when the player attaches to vehicle, the player can be set to its child, but when it's not needed anymore the player cannot be set back to its root, or maybe I'm just using it wrong, I only need this parent stuff when the player is attached a.k.a part of the attachedPlayers table. The reason why I would want to reset it back to root is because when the car changes interior/dimension the player because he's still an active element of the car, gets teleported there too, even if he is detached and etc.
  8. Yeah it's working now, somehow I've had completely forgot about this function. Thanks for the help!
  9. Hi guys! lately I've bumped into a problem in my script, which I really can't have any ideas how to solve, or where did I :Oed up with the logic. It's not really the hardest thing to do, but I overcomplicated it somehow with the tables and stuff. The script is basically simple, you can attach/detach to a vehicle with a button press, and when the car moves into different interior/dimension then your character will follow it there, but get's detached because I couldn't really make it work, bugged out with attach or something. But the important stuff is that the interior change is actually working somehow, but the dimension didn't changed, no matter how I done it. local attachedPlayers = {} function handleInteriorDimensionChange(oldInterior, newInterior, oldDimension, newDimension) local vehicle = source local attachedElements = getAttachedElements(vehicle) for _, attachedElement in ipairs(attachedElements) do if getElementType(attachedElement) == "player" then local attachedPlayer = attachedElement triggerClientEvent("playerAnimationToClient", root, "", "", attachedPlayer) triggerClientEvent("stopUpdatingPlayerRotation", root, attachedPlayer) if oldInterior ~= newInterior then setElementInterior(attachedPlayer, newInterior) outputChatBox (inspect (attachedPlayer) .. "'s interior changed from " .. oldInterior .. " to " .. newInterior) end if oldDimension ~= newDimension then setElementDimension(attachedPlayer, newDimension) outputChatBox(inspect(attachedPlayer) .. "'s dimension changed from " .. oldDimension .. " to " .. newDimension) end detachElements(attachedPlayer, vehicle) setElementData(attachedPlayer, "attached", false) setElementData(attachedPlayer, "attachedVehicle", nil) setElementData(attachedPlayer, "attachmentPosition", nil) if attachmentPoint then attachmentPointsStatus[attachmentPoint] = false end end end end function getAttachedPlayers(vehicle) local attachedPlayers = {} local attachedElements = getAttachedElements(vehicle) for _, attachedElement in ipairs(attachedElements) do if getElementType(attachedElement) == "player" then table.insert(attachedPlayers, attachedElement) end end return attachedPlayers end
  10. You maybe should adjust the player height positions when starting descending at that specific position, just to suit your needs.
  11. Since I don't see the main things which are needed to make the original chat disappear in your code snippet, I will give you some code snippet improvements that you need to have in your code besides that you have right now. triggerClientEvent("onMessageIncome",source,""..message,0) local textsToDraw = {} local hideown local showtime local characteraddition addEvent("onMessageIncome",true) addEventHandler("onMessageIncome",getRootElement(),income) function income(message,messagetype) if source ~= getLocalPlayer() or not hideown then addText(source,message,messagetype) end end function addText(source,message,messagetype) local notfirst = false for i,v in ipairs(textsToDraw) do if v[1] == source then v[4] = v[4] + 1 notfirst = true end end local infotable = {source,message,messagetype,0} table.insert(textsToDraw,infotable) if not notfirst then setTimer(removeText,showtime + (#message * characteraddition),1,infotable) end end function sendMessageToClient(message,messagetype) if messagetype == 0 or messagetype == 2 then triggerClientEvent("onMessageIncome",source,message,messagetype) end function sendLocalSay(ped, msg) sendSay(ped, msg) end addCommandHandler("say", function (commandName, ...) if getElementData(localPlayer, "loggedIn") then sendSay(localPlayer, table.concat({...}, " "):gsub("#%x%x%x%x%x%x", "")) end end)
  12. I think I know a solution for it, it's really cheap and your idea in my opinion is the best because if you want something custom then definitely use that custom model, basically you need to define the two points then use the model, define the args exactly to match that length you need it to be. But if you wanna stay with the cheap solution then you should use these functions:(These functions are used in the first method you mentioned.) getDistanceBetweenPoints3D dxDrawLine3D
  13. You're welcome, let us know if you need some other help too with the script.
×
×
  • Create New...