Extinction Posted February 23, 2016 Share Posted February 23, 2016 Hi there, I used and edited a community script I think it's Bonsai's Notification Script. I am trying to do only for the single player's itself, but instead it shows for everyone. Server Sided - else triggerClientEvent(source,"showNotification",getRootElement(), "An error occured! Please choose a different username/or password!", "error") end else triggerClientEvent(source,"showNotification",getRootElement(), "An account with this username already exists!", "error") end else triggerClientEvent(source,"showNotification",getRootElement(), "Null: Contact an Administrator", "error") end else triggerClientEvent(source,"showNotification",getRootElement(), "Null: Contact an Administrator", "error") end Link to comment
ozulus Posted February 23, 2016 Share Posted February 23, 2016 Just change getRootElement() to resourceRoot or source. Link to comment
Bonus Posted February 24, 2016 Share Posted February 24, 2016 Where do you use that? Because source is the root element here, not the player. Link to comment
stevensalvaro Posted February 24, 2016 Share Posted February 24, 2016 hmm you can use localPlayer Link to comment
Dealman Posted February 24, 2016 Share Posted February 24, 2016 hmm you can use localPlayer No, he can't as the script is server-sided. localPlayer is a client-side only variable, obviously. @Extinction: The whole if statement seems a bit messy, any chance you could provide more of the relevant code? It's hard to try and help you with only a fraction of it. How is source defined? It's being sent to all clients, so source is not defined as a specific player. Any errors? Is source returning nil? Link to comment
Extinction Posted February 24, 2016 Author Share Posted February 24, 2016 No, it's not returning nil. Works perfect, just that it shows for everyone rather that individuals. Link to comment
Dealman Posted February 24, 2016 Share Posted February 24, 2016 No, it's not returning nil. Works perfect, just that it shows for everyone rather that individuals. And now read the rest of my reply Link to comment
smw94 Posted February 29, 2016 Share Posted February 29, 2016 change getRootElement() to player element you want to display Link to comment
ArminFx Posted March 10, 2016 Share Posted March 10, 2016 Test with "source" instead of getrootelement 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