Desaster Posted October 14, 2013 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
Discord Moderators Zango Posted October 14, 2013 Discord Moderators Posted October 14, 2013 You can toggle a player's chatbox using showChat, if I understood your question.
Chopper Posted October 14, 2013 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
Discord Moderators Zango Posted October 14, 2013 Discord Moderators 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.
Chopper Posted October 14, 2013 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.
Desaster Posted October 14, 2013 Author 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
xXMADEXx Posted October 14, 2013 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 )
Desaster Posted October 15, 2013 Author Posted October 15, 2013 I am useing a topbarchat made by xxMADExx any idea maybe with arguments ?
Moderators Citizen Posted October 15, 2013 Moderators 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.
Discord Moderators Zango Posted October 15, 2013 Discord Moderators 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 )
Moderators Citizen Posted October 18, 2013 Moderators Posted October 18, 2013 no he wants to hide the topbarchat and the regular chatbox.
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