#meS Posted August 17, 2015 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)
FlyingSpoon Posted August 17, 2015 Posted August 17, 2015 function setDeathSpawn() guiSetVisible(SPAWN.window[1],true) showCursor(true) end addEventHandler("onClientPlayerWasted",resourceRoot,setDeathSpawn)
#meS Posted August 17, 2015 Author 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 -_________-
..:D&G:.. Posted August 17, 2015 Posted August 17, 2015 Try now function setDeathSpawn() guiSetVisible(SPAWN.window[1],true) showCursor(true) end addEventHandler("onClientPlayerWasted",getLocalPlayer(),setDeathSpawn)
nasserdfdd Posted August 17, 2015 Posted August 17, 2015 try this:) function setDeathSpawn() guiSetVisible(SPAWN.window[1],true) showCursor(true) end addEventHandler("onClientPlayerWasted",getLocalPlayer(),setDeathSpawn)
Mr_Moose Posted August 17, 2015 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.
FlyingSpoon Posted August 17, 2015 Posted August 17, 2015 Ahhh... I guess I learnt something new. Thanks @Mr.Moose.
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