Dzsozi (h03) Posted April 11, 2014 Posted April 11, 2014 Hello guys, today I was thinking about if is this possible if someone dies the dead body stays at the position where he died and the player is respawns. Hope you understand me. If is this possible what events and functions should I use to make this? Your signature image is too large. Removed
Moderators IIYAMA Posted April 11, 2014 Moderators Posted April 11, 2014 Serverside: Events: "onPlayerWasted" Functions: getElementPosition getElementRotation createPed killPed and maybe for removing the peds after a while: setTimer getTickCount() destroyElement Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Dzsozi (h03) Posted April 11, 2014 Author Posted April 11, 2014 Okay, thank you, I will try something. Your signature image is too large. Removed
Dzsozi (h03) Posted April 17, 2014 Author Posted April 17, 2014 I have another question. Is this possible to stop the flying camera when a player gets wasted? Because I want to make a timer for respawn, and I want the camera to stay at the player. How is this even possible? I've already seen it in a video. Your signature image is too large. Removed
Moderators IIYAMA Posted April 18, 2014 Moderators Posted April 18, 2014 (edited) By using setCameraMatrix You can try this: local x, y, z, lx, ly, lz = 0,0,0,0,0,0 local antiCameraBugHandler = false local stopCameraBugFunction stopCameraBugFunction = function() if getElementHealth(localPlayer) > 0 then removeEventHandler("onClientRender",stopCameraBugFunction) antiCameraBugHandler = false setCameraTarget (localPlayer) else setCameraMatrix (x, y, z, lx, ly, lz) end end addEventHandler("onClientPlayerWasted",localPlayer, function() if not antiCameraBugHandler then x, y, z, lx, ly, lz = getCameraMatrix () antiCameraBugHandler = true addEventHandler("onClientRender",stopCameraBugFunction) end end) Edited April 18, 2014 by Guest Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Dzsozi (h03) Posted April 18, 2014 Author Posted April 18, 2014 By using setCameraMatrixYou can try this: local antiCameraBugHandler = false local stopCameraBugFunction stopCameraBugFunction = function() if getElementHealth(localPlayer) > 0 then removeEventHandler("onClientRender",stopCameraBugFunction) antiCameraBugHandler = false setCameraTarget (localPlayer) else local x, y, z, lx, ly, lz = getCameraMatrix () setCameraMatrix (x, y, z, lx, ly, lz) end end addEventHandler("onClientPlayerWasted",localPlayer, function() if not antiCameraBugHandler then antiCameraBugHandler = true addEventHandler("onClientRender",stopCameraBugFunction) end end) It seems like it's not working. No changes when I die, it's like before. Do you have any other ideas? Your signature image is too large. Removed
.:HyPeX:. Posted April 18, 2014 Posted April 18, 2014 Creating a ped client-side and seting a target to it until you revive. My ingame nick is ~HyPeX~ BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager
Moderators IIYAMA Posted April 18, 2014 Moderators Posted April 18, 2014 It seems like it's not working. No changes when I die, it's like before. Do you have any other ideas? Edited(see last post) Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Dzsozi (h03) Posted June 11, 2014 Author Posted June 11, 2014 Sorry for not replying, I forgot about this post. But it's still not working. My camera still goes up when I get wasted. Your signature image is too large. Removed
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now