Kenix Posted December 4, 2010 Share Posted December 4, 2010 I have made a script that when the player dies at it there is other weather but it works on all players. How to make that it worked only on one player??? server addEventHandler( "onPlayerWasted", getRootElement( ), function() triggerClientEvent ("playerw", getRootElement()) end ) client localPlayer = getLocalPlayer() addEvent("playerw",true) addEventHandler( "playerw", localPlayer, function( ) setSkyGradient (100,50,0,70,0,0); end ) Please help to correct my script.=( Link to comment
Castillo Posted December 4, 2010 Share Posted December 4, 2010 try this, addEventHandler( "onPlayerWasted", getRootElement( ), function() triggerClientEvent (source,"playerw", source) end ) Link to comment
Kenix Posted December 4, 2010 Author Share Posted December 4, 2010 Thanks the dude the enormous!!!!!!!!!!!!!!!!! Link to comment
Discord Moderators Zango Posted December 4, 2010 Discord Moderators Share Posted December 4, 2010 Isn't quite redundant to do this serverside if you're only going to set weather for the player? clientside: addEventHandler ('onClientPlayerWasted', root, function () if (source == getLocalPlayer()) then setSkyGradient (100,50,0,70,0,0) end end ) 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