Dzsozi (h03) Posted April 11, 2014 Share 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? Link to comment
Moderators IIYAMA Posted April 11, 2014 Moderators Share Posted April 11, 2014 Serverside: Events: "onPlayerWasted" Functions: getElementPosition getElementRotation createPed killPed and maybe for removing the peds after a while: setTimer getTickCount() destroyElement Link to comment
Dzsozi (h03) Posted April 11, 2014 Author Share Posted April 11, 2014 Okay, thank you, I will try something. Link to comment
Dzsozi (h03) Posted April 17, 2014 Author Share 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. Link to comment
Moderators IIYAMA Posted April 18, 2014 Moderators Share 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 Link to comment
Dzsozi (h03) Posted April 18, 2014 Author Share 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? Link to comment
.:HyPeX:. Posted April 18, 2014 Share Posted April 18, 2014 Creating a ped client-side and seting a target to it until you revive. Link to comment
Moderators IIYAMA Posted April 18, 2014 Moderators Share 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) Link to comment
Dzsozi (h03) Posted June 11, 2014 Author Share 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. Link to comment
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