Tokio Posted June 4, 2017 Posted June 4, 2017 (edited) I have this: addEventHandler('onPlayerQuit', root, function(reason) Reasons = { ["Unknown"] = "Nem tudni", ["Quit"] = "kilépett.", ["Kicked"] = "kirúgva a szerverről.", ["Banned"] = "kibanolva a szerverről.", ["Timed Out"] = "kifagyott.", ["Bad Connection"] = "rossz internetkapcsolat" } local name = getPlayerName(source) triggerClientEvent(root, "createNotification", root, "#FFffFF"..Reasons[reason], "simple", name) end ) and the "Quit", "Kicked", and "Banned" msg working fine, but the "Timed Out" no.. does not show the timed out notification, but why? yeah, and i got this error: S.lua:12: attempt to concatenate field '?' (a nil value) thanks the help! Edited June 4, 2017 by 50cent the error code My servers: Fun: Derby(DD):
pa3ck Posted June 4, 2017 Posted June 4, 2017 That is because the exact message is "Timed out" (lowercase 'o') and the string is case-sensitive. Reasons = { ["Unknown"] = "Nem tudni", ["Quit"] = "kilépett.", ["Kicked"] = "kirúgva a szerverről.", ["Banned"] = "kibanolva a szerverről.", ["Timed out"] = "kifagyott.", ["Bad Connection"] = "rossz internetkapcsolat" } addEventHandler('onPlayerQuit', root, function(reason) local name = getPlayerName(source) triggerClientEvent(root, "createNotification", root, "#FFffFF"..Reasons[reason], "simple", name) end ) 1
Tokio Posted June 4, 2017 Author Posted June 4, 2017 11 minutes ago, pa3ck said: That is because the exact message is "Timed out" (lowercase 'o') and the string is case-sensitive. Reasons = { ["Unknown"] = "Nem tudni", ["Quit"] = "kilépett.", ["Kicked"] = "kirúgva a szerverről.", ["Banned"] = "kibanolva a szerverről.", ["Timed out"] = "kifagyott.", ["Bad Connection"] = "rossz internetkapcsolat" } addEventHandler('onPlayerQuit', root, function(reason) local name = getPlayerName(source) triggerClientEvent(root, "createNotification", root, "#FFffFF"..Reasons[reason], "simple", name) end ) Thank you! My servers: Fun: Derby(DD):
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