Jump to content

Flashmyname

Members
  • Posts

    31
  • Joined

  • Last visited

  • Days Won

    2

Flashmyname last won the day on March 10

Flashmyname had the most liked content!

Details

  • Interests
    IT Network Systems Administration & Security

Recent Profile Visitors

1,356 profile views

Flashmyname's Achievements

Rat

Rat (9/54)

9

Reputation

  1. Nevermind, figured it out in the end.
  2. 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.
  3. Yeah it's working now, somehow I've had completely forgot about this function. Thanks for the help!
  4. 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
  5. You maybe should adjust the player height positions when starting descending at that specific position, just to suit your needs.
  6. 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)
  7. 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
  8. You're welcome, let us know if you need some other help too with the script.
  9. I have some wild guess in the animation that you probably looking for, which might look like holding a zipline. "CAMERA", "picstnd_take"
  10. It's basically using combinations of binding a key and telling it what to do, then you need to render the fly sequence where you define which key does what, for example if the player presses up then it goes forward or something like that. You can use these: BindKey Math functions getCameraMatrix setElementPosition setElementRotation
  11. Flashmyname

    Help

    So you mean, that when you and your partner shoot each other then both character dies simultaneously?
  12. Flashmyname

    Help

    Can you provide more information on that "situation" that you mean? or some code snippet that will help us define the problem that you having?
  13. You can prioritize the resources which means two ways. The first way is to prioritize their download, so you can kinda line them up, which should be downloaded first and things like that. But I think you mean, you need to start the other resources first, then I recommend you create a serverside resourcestarter script, which basically will use timers and predefined args to make your own way of loading the needed resources.
  14. It doesn't work just like that, you should define what a 'hash' is, and what should be applied to. for example if you wanna encrypt your password while typing it in, you should use it somehow like this one. if string.find(details, "hash") then if length > 0 then hash = string.rep("•", length) end end
  15. Yeah I bet, but without proper info on these things, we cannot help and if somebody is not willing to do the search for it, then it is what it is.
×
×
  • Create New...