JoZeFSvK Posted March 10, 2013 Share Posted March 10, 2013 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 ) Link to comment
Baseplate Posted March 10, 2013 Share Posted March 10, 2013 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. Link to comment
JoZeFSvK Posted March 10, 2013 Author Share Posted March 10, 2013 hmm thank you but when i died i press f1 and nothing it will them that i am alone on server ? Link to comment
PaiN^ Posted March 10, 2013 Share Posted March 10, 2013 @ Samer : You're missing an end function funkcia () if ( isPlayerDead( localPlayer ) ) then guiSetVisible( window1, true ) showCursor( true ) end end bindKey ("F1", "down", funkcia ) Link to comment
Baseplate Posted March 10, 2013 Share Posted March 10, 2013 Aw I apologize, thanks pain. Link to comment
JoZeFSvK Posted March 10, 2013 Author Share Posted March 10, 2013 shit epic now i cant show panel i open but when i again press f1 nothing Link to comment
Vision Posted March 10, 2013 Share Posted March 10, 2013 guiSetVisible( window1, true ) Should be guiSetVisible ( window1, not guiGetVisible ( window1 ) ) Link to comment
PaiN^ Posted March 10, 2013 Share Posted March 10, 2013 You're right, Mine only shows the window, But your's makes it disappear as will .. Link to comment
X-SHADOW Posted March 10, 2013 Share Posted March 10, 2013 This function is deprecated. This means that its use is discouraged and that it might not exist in future versions. -------------------------------------------------------------------------------- Please use isPedDead instead. Link to comment
Baseplate Posted March 10, 2013 Share Posted March 10, 2013 or you can use isPedDead but it's server-sided so you'll have to trigger events. You can see that right? Link to comment
X-SHADOW Posted March 10, 2013 Share Posted March 10, 2013 Are You kiding me ? you say it's ServerSide only you didn't say it wont work if he use isPlayerDead . 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