ZeyadGTX Posted June 9, 2014 Share Posted June 9, 2014 Is there away here to Make when new player come do like that Name Has Joined The Game [NEW] my joinquit addEventHandler("onClientPlayerJoin", root, function() outputChatBox("* #FFFFFF"..getPlayerName(source):gsub("#%x%x%x%x%x%x","").."#006400 has joined the game", 0, 100, 0, true) end) addEventHandler("onClientPlayerChangeNick", root, function(old, new) old = old:gsub("#%x%x%x%x%x%x","") new = new:gsub("#%x%x%x%x%x%x","") if old ~= new then outputChatBox("* #FFFFFF"..old.."#006400 is now known as #FFFFFF"..new, 0, 100, 0, true) end end) addEventHandler("onClientPlayerQuit", root, function(reason) outputChatBox("* #FFFFFF"..getPlayerName(source):gsub("#%x%x%x%x%x%x","").."#006400 has left the game [#FFFFFF" .. reason .. "#006400]", 0, 100, 0, true) end) --[[ addEventHandler('onClientPlayerQuit', root, function(reason) outputChatBox('* ' .. getPlayerName(source) .. ' has left the game [' .. reason .. ']', 255, 100, 100) end ) ]] Link to comment
Hazard| Posted June 17, 2014 Share Posted June 17, 2014 Is there away here to Make when new player come do like that Name Has Joined The Game [NEW]my joinquit addEventHandler("onClientPlayerJoin", root, function() outputChatBox("* #FFFFFF"..getPlayerName(source):gsub("#%x%x%x%x%x%x","").."#006400 has joined the game", 0, 100, 0, true) end) addEventHandler("onClientPlayerChangeNick", root, function(old, new) old = old:gsub("#%x%x%x%x%x%x","") new = new:gsub("#%x%x%x%x%x%x","") if old ~= new then outputChatBox("* #FFFFFF"..old.."#006400 is now known as #FFFFFF"..new, 0, 100, 0, true) end end) addEventHandler("onClientPlayerQuit", root, function(reason) outputChatBox("* #FFFFFF"..getPlayerName(source):gsub("#%x%x%x%x%x%x","").."#006400 has left the game [#FFFFFF" .. reason .. "#006400]", 0, 100, 0, true) end) --[[ addEventHandler('onClientPlayerQuit', root, function(reason) outputChatBox('* ' .. getPlayerName(source) .. ' has left the game [' .. reason .. ']', 255, 100, 100) end ) ]] Do you mean like this? addEventHandler("onClientPlayerJoin", root, function() outputChatBox("* #FFFFFF"..getPlayerName(source):gsub("#%x%x%x%x%x%x","").."#006400 Has Joined The Game", 0, 100, 0, true) end) Link to comment
ZeyadGTX Posted June 17, 2014 Author Share Posted June 17, 2014 i mean when he join , if he is new to the server then getPlayerName(source) Has Joined The Game [NEW] Link to comment
Gtagasje Posted June 18, 2014 Share Posted June 18, 2014 You should use the following functions if you want to do that (serversided script) getPlayerAccount() -- Retrieve the player's account setAccountData() -- Set an account data key to a value to check if the player has joined before or not getAccountData() -- When the player logs in, check his account data to see if he has joined earlier or not (the key you set with setAccountData "onPlayerLogin" -- The event to trigger the checking if the player has joined before or not and if not set his account data to a value that he has joined and is not new. Link to comment
-.Paradox.- Posted June 19, 2014 Share Posted June 19, 2014 You should use the following functions if you want to do that (serversided script) getPlayerAccount() -- Retrieve the player's account setAccountData() -- Set an account data key to a value to check if the player has joined before or not getAccountData() -- When the player logs in, check his account data to see if he has joined earlier or not (the key you set with setAccountData "onPlayerLogin" -- The event to trigger the checking if the player has joined before or not and if not set his account data to a value that he has joined and is not new. onPlayerJoin* Why you can't just use serials in stead account data? Link to comment
ZeyadGTX Posted June 19, 2014 Author Share Posted June 19, 2014 Oh okay its done , Some moderator close this topic 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