I have read the wiki and other guides but I can’t seem to understand the concept of Functions and Arguments fully.
hook.Add( "PlayerInitialSpawn", "First_Spawn", function( ply ) ply:PrintMessage( HUD_PRINTTALK, "Welcome to the server " .. ply:GetName() .. "!" ); end );
In this code, I have some questions.
What is (ply) and why is it written in brackets?
( "PlayerInitialSpawn", "First_Spawn", function( ply )
Why are there commas?
I would really appreciate a detailed response about this as I want to understand this and start writing my own code soon.