Help with lua code

i need to know how to make a custom join message for a certain steam id

Use PlayerInitialSpawn

and write something that should look like this:

local ID = 'insertssteamidhere'
hook.Add( 'PlayerInitialSpawn', 'dankpersonjoinedlol', function( ply )
    if ply:SteamID() == ID then
        for i, ply in pairs( player.GetAll() ) do
            ply:ChatPrint( 'dank L.A.U coder joined!' )

           -- for chat.AddText() do
            ply:SendLua( 'chat.AddText(Color(25, 25, 255), dank L.A.U coder joined!)' )
end )

ID is nil use id.
v is nil use ply.

how do i do that with chat.AddText?

i edited it to a fixed version, since someone is a lua nazi

you got the point lol


[editline]14th August 2016[/editline]

i need some lua code so when my Steam ID joins the game it will say “Owner Joined” or something but with colour so preferaby with chat.AddText

Read the first post I made…

oh and do you know how to create and timer create to run a console command every 60 seconds?

Sure he does…

Create a local function that runs the command on player, inside this function, create a timer that calls this function again