Jump to content

Fix


Recommended Posts

Posted

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 
) 
    ]] 

My nick in MTA is Spider

  • 2 weeks later...
Posted
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) 
  

If you want a decent paid scripter, don't contact me, I suck.

Posted

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. 
  

Yes, this is infact a signature.

Posted
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?

If you're looking for a cheap paid scripter, don't hesitate to contact me.

Great minds discuss ideas, Average minds discuss events and small minds discuss people.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...