'~DaLesTe^' Posted April 11, 2015 Share Posted April 11, 2015 Is there a script that allows the player as few as you are logged into your account can use the Chat? For example: Login to your account to use chat addEventHandler( "onPlayerChat", getRootElement(), sendMessageToNearbyPlayers ) function blockChatMessage() cancelEvent() end -- attach it as a handler to onPlayerChat addEventHandler( "onPlayerChat", getRootElement(), blockChatMessage ) Something like this Link to comment
Enargy, Posted April 11, 2015 Share Posted April 11, 2015 addEventHandler("onPlayerChat", root, function() local account = getPlayerAccount( source ); if ( not isGuestAccount(account) ) then return else outputChatBox("Login to your account to use chat", source); end end ); Link to comment
xXMADEXx Posted April 11, 2015 Share Posted April 11, 2015 addEventHandler("onPlayerChat", root, function() local account = getPlayerAccount( source ); if ( not isGuestAccount(account) ) then return else outputChatBox("Login to your account to use chat", source); end end ); You never canceled the event. addEventHandler("onPlayerChat", root, function() local account = getPlayerAccount( source ); if ( isGuestAccount(account) ) then outputChatBox("Login to your account to use chat", source); cancelEvent ( ); end end ); Link to comment
Enargy, Posted April 11, 2015 Share Posted April 11, 2015 addEventHandler("onPlayerChat", root, function() local account = getPlayerAccount( source ); if ( not isGuestAccount(account) ) then return else outputChatBox("Login to your account to use chat", source); end end ); You never canceled the event. addEventHandler("onPlayerChat", root, function() local account = getPlayerAccount( source ); if ( isGuestAccount(account) ) then outputChatBox("Login to your account to use chat", source); cancelEvent ( ); end end ); I forgot cancelEvent , thanks 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