Desaster Posted October 14, 2013 Share Posted October 14, 2013 I wanna make some login text and wanna ask how it is possible to show global chat for all the players except the logging player Link to comment
Discord Moderators Zango Posted October 14, 2013 Discord Moderators Share Posted October 14, 2013 You can toggle a player's chatbox using showChat, if I understood your question. Link to comment
Chopper Posted October 14, 2013 Share Posted October 14, 2013 (edited) you can do this for serverside. Triggers the client event showChat, when a player logs in. Since you need showChat as a client side function, you have to use triggerClientEvent. Server function showChat() triggerClientEvent("showChat", getRootElement) end addEventHandler("onPlayerLogin",getRootElement(),showChat) Client function showChat() showChat(true) end addEvent("showChat", true) addEventHandler("showChat",getRootElement(), showChat) Didnt test, should work fine though. Edited October 14, 2013 by Guest Link to comment
Discord Moderators Zango Posted October 14, 2013 Discord Moderators Share Posted October 14, 2013 Don't wanna be that guy, but showChat is client and serverside. Blue highlighting in the [lua] markup indicates both variants. Link to comment
Chopper Posted October 14, 2013 Share Posted October 14, 2013 in this type of script, he needed it as a clientside. i said it kinda wrong, but true, ill edit the post in a sec. Link to comment
Desaster Posted October 14, 2013 Author Share Posted October 14, 2013 nice idea's but the only problem is that I forget to tell I am not useing outputChatBox I am useing a topbarchat Link to comment
xXMADEXx Posted October 14, 2013 Share Posted October 14, 2013 in this type of script, he needed it as a clientside. i said it kinda wrong, but true, ill edit the post in a sec. It could be on the server-side by simply using the player the is logging in. addEventHandler ( "onPlayerLogin", root, function ( ) showChat ( source, true ) end ) addEventHandler ( "onPlayerJoin", root, function ( ) showChat ( source, false ) end ) Link to comment
Desaster Posted October 15, 2013 Author Share Posted October 15, 2013 I am useing a topbarchat made by xxMADExx any idea maybe with arguments ? Link to comment
Moderators Citizen Posted October 15, 2013 Moderators Share Posted October 15, 2013 As far I can see, the topbarchat doesn't let you show or hide it, maybe you will have to create a new exported function to the tobachat resource to let you get control on this (and probably a variable that you will use in an if statement you will have to add too in the render function). If you don't see what I mean, xXMADEXx will probably add this feature four you. Link to comment
Discord Moderators Zango Posted October 15, 2013 Discord Moderators Share Posted October 15, 2013 The way I understand this - you want to disable the chatbox and use the topbarchat resource instead? According to this page on community, Serverside: addEventHandler ('onPlayerLogin', root, function () showChat (source, false) exports.topbarchat:sendClientMessage ('Thank you for logging in', source, 255, 255, 255) end ) Link to comment
Moderators Citizen Posted October 18, 2013 Moderators Share Posted October 18, 2013 no he wants to hide the topbarchat and the regular chatbox. 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