Jump to content

open window on death


JoZeFSvK

Recommended Posts

Posted

Hey how i create when player death can open panel BUT! when is ALIVE CAN´T open panel.

function funkcia() 
     guiSetVisible(window1, not guiGetVisible(window1)) 
     showCursor(guiGetVisible(window1)) 
end 
  
bindKey ("F1", "down", funkcia ) 
  

Posted
function funkcia() 
if (isPlayerDead(localPlayer)) then 
     guiSetVisible(window1, not guiGetVisible(window1)) 
     showCursor(guiGetVisible(window1)) 
end 
bindKey ("F1", "down", funkcia ) 
  

or you can use isPedDead but it's server-sided so you'll have to trigger events.

Posted

@ Samer : You're missing an end

function funkcia () 
    if ( isPlayerDead( localPlayer ) ) then 
        guiSetVisible( window1, true ) 
        showCursor( true ) 
    end 
end 
bindKey ("F1", "down", funkcia ) 
  

Posted

This function is deprecated. This means that its use is discouraged and that it might not exist in future versions.

--------------------------------------------------------------------------------

Please use isPedDead instead.

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...