#meS Posted August 17, 2015 Share Posted August 17, 2015 hello i made when play die it shows screen but it shows for every body!!! code: function setDeathSpawn() guiSetVisible(SPAWN.window[1],true) showCursor(true) end addEventHandler("onClientPlayerWasted",root,setDeathSpawn) Link to comment
FlyingSpoon Posted August 17, 2015 Share Posted August 17, 2015 function setDeathSpawn() guiSetVisible(SPAWN.window[1],true) showCursor(true) end addEventHandler("onClientPlayerWasted",resourceRoot,setDeathSpawn) Link to comment
#meS Posted August 17, 2015 Author Share Posted August 17, 2015 function setDeathSpawn() guiSetVisible(SPAWN.window[1],true) showCursor(true) end addEventHandler("onClientPlayerWasted",resourceRoot,setDeathSpawn) now it's not working at all -_________- Link to comment
..:D&G:.. Posted August 17, 2015 Share Posted August 17, 2015 Try now function setDeathSpawn() guiSetVisible(SPAWN.window[1],true) showCursor(true) end addEventHandler("onClientPlayerWasted",getLocalPlayer(),setDeathSpawn) Link to comment
nasserdfdd Posted August 17, 2015 Share Posted August 17, 2015 try this:) function setDeathSpawn() guiSetVisible(SPAWN.window[1],true) showCursor(true) end addEventHandler("onClientPlayerWasted",getLocalPlayer(),setDeathSpawn) Link to comment
Mr_Moose Posted August 17, 2015 Share Posted August 17, 2015 "localPlayer" is a valid argument for this eventhandler as the script loads individually for each client, another solution with the main code in focus would be to check if "source" is equal to "localPlayer" as that only occurs when localPlayer is the player who died. Link to comment
FlyingSpoon Posted August 17, 2015 Share Posted August 17, 2015 Ahhh... I guess I learnt something new. Thanks @Mr.Moose. 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