The title is a little vague, don’t hate. :PP Anyhow…
I was wondering which method is best?
local function RP_TimerFunc_PayDay() for i = 1, #player.GetAll() do if IsValid(player.GetAll()*) then local v = player.GetAll()* v:RP_PayDay() end end end timer.Create("RP_TimerHandle_PayDay",600,0,RP_TimerFunc_PayDay)
or this one… I’m also still kind of learning/trying to teaching myself a few things. Just need to know which one would be better for a
populated server. (32 players example.)
local function RP_PD_PlayerSpawn( ply ) timer.Create("RP.PayDayTimer._"..ply:EntIndex(),600,0,function() if IsValid( ply ) then ply:RP_PayDay() end end) end hook.Add("PlayerSpawn","RP_PDT.PlayerSpawnHook",RP_PD_PlayerSpawn)
** All help is appreciated! ** :eng101: :eng101: :eng101: