Extinction Posted February 23, 2016 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
ozulus Posted February 23, 2016 Posted February 23, 2016 Just change getRootElement() to resourceRoot or source.
Bonus Posted February 24, 2016 Posted February 24, 2016 Where do you use that? Because source is the root element here, not the player.
Dealman Posted February 24, 2016 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?
Extinction Posted February 24, 2016 Author Posted February 24, 2016 No, it's not returning nil. Works perfect, just that it shows for everyone rather that individuals.
Dealman Posted February 24, 2016 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
smw94 Posted February 29, 2016 Posted February 29, 2016 change getRootElement() to player element you want to display
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