Jump to content

Dead body


Recommended Posts

  • Moderators

Serverside:

Events:

"onPlayerWasted" 

Functions:

getElementPosition 
getElementRotation 
createPed 
killPed 

and maybe for removing the peds after a while:

  
setTimer 
getTickCount() 
destroyElement 
  

Link to comment
  • Moderators

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 by Guest
Link to comment
By using setCameraMatrix

You 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
  • 1 month later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...