Mefisto_PL Posted January 3, 2012 Share Posted January 3, 2012 I want to make a custom reasons to join/quit script. For example: Mefisto_PL has left the game [Go Away] Link to comment
Gr0x Posted January 3, 2012 Share Posted January 3, 2012 i think you can do it with: if reason == "Quit" then reason = "Go away" end outputChatBox(...) Link to comment
Mefisto_PL Posted January 3, 2012 Author Share Posted January 3, 2012 I have this script, if you can fix this I will be very lucky addEventHandler('onClientPlayerJoin', root, function() outputChatBox('>> ' .. getPlayerName(source) .. ' dołącza do gry !', 0, 159, 255) end ) addEventHandler('onClientPlayerChangeNick', root, function(oldNick, newNick) outputChatBox('>> ' .. oldNick .. ' zmienił nick na ' .. newNick, 0, 159, 255) end ) addEventHandler('onClientPlayerQuit', root, function(reason) outputChatBox('>> ' .. getPlayerName(source) .. ' opuścił serwer [' .. reason .. ']', 0, 159, 255) end ) reasontable = { ["Kicked"] = "Wyrzucony", ["Quit"] = "Wyszedł", ["Banned"] = "Zbanowany", ["Bad Connection"] = "Błąd połaczenia", ["Timed Out"] = "Rozłączono" } Link to comment
Gr0x Posted January 3, 2012 Share Posted January 3, 2012 reason2 = " " addEventHandler('onClientPlayerJoin', root, function() outputChatBox('>> ' .. getPlayerName(source) .. ' dołącza do gry !', 0, 159, 255) end ) addEventHandler('onClientPlayerChangeNick', root, function(oldNick, newNick) outputChatBox('>> ' .. oldNick .. ' zmienił nick na ' .. newNick, 0, 159, 255) end ) addEventHandler('onClientPlayerQuit', root, function(reason) if reason == "Quit" then reason2 = "Wyszedł" elseif reason == "Kicked" then reason2 = "Wyrzucony" elseif reason == "Banned" then reason2 = "Zbanowany" then elseif reason == "Timed Out" then reason2 = "Rozłączono" elseif reason == "Bad Connection" then reason2 = "Błąd połaczenia" end outputChatBox('>> ' .. getPlayerName(source) .. ' opuścił serwer [' .. reason2 .. ']', 0, 159, 255) end ) I think it will work. Link to comment
Mefisto_PL Posted January 3, 2012 Author Share Posted January 3, 2012 not working . :< Link to comment
Mefisto_PL Posted January 3, 2012 Author Share Posted January 3, 2012 Warning: Loading script failed: AllInOne\joinquit.lua:23: unexpected symbol near 'then' Link to comment
GTX Posted January 3, 2012 Share Posted January 3, 2012 reason2 = " " addEventHandler('onClientPlayerJoin', root, function() outputChatBox('>> ' .. getPlayerName(source) .. ' dołącza do gry !', 0, 159, 255) end ) addEventHandler('onClientPlayerChangeNick', root, function(oldNick, newNick) outputChatBox('>> ' .. oldNick .. ' zmienił nick na ' .. newNick, 0, 159, 255) end ) addEventHandler('onClientPlayerQuit', root, function(reason) if reason == "Quit" then reason2 = "Wyszedł" elseif reason == "Kicked" then reason2 = "Wyrzucony" elseif reason == "Banned" then reason2 = "Zbanowany" elseif reason == "Timed Out" then reason2 = "Rozłączono" elseif reason == "Bad Connection" then reason2 = "Błąd połaczenia" end outputChatBox('>> ' .. getPlayerName(source) .. ' opuścił serwer [' .. reason2 .. ']', 0, 159, 255) end ) Link to comment
Mefisto_PL Posted January 3, 2012 Author Share Posted January 3, 2012 Yea I fix that , next you write it And Thanks :* Link to comment
Gr0x Posted January 3, 2012 Share Posted January 3, 2012 Eh, i wrote one +then, sorry 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