Would this cause any lag?

[lua]
function useful()
//commented out trash
//more of it
//why you ask?
//sometimes i want to edit my script midgame
//and not having the function and hook already fucks it up
//i dont want to be lagging players while its inactive
//its ran clientside btw
end
hook.Add( “Think”, “useful”, useful )
[/lua]

what

if runs at clientside you only will cause fps drops, but…You should see how heavy it’s the function, but i actually create instance of the hooks

[lua]
net.Receive(“INeedThink”,function()

hook.Add(“Think”,“ThinkFor”…LocalPlayer():Nick(),useful)

end)

function useful()
heavyProcess()

if(canDelete) then
    hook.Remove("Think","ThinkFor"..LocalPlayer():Nick())
end

end

[/lua]

might want to check Nick() to UniqueID()

It depends on what you’re running. You can use the think hook for various things; but we need more info. What are you planning on running in the think hook?

You can always do a benchmark on it to see if it’s taking too much time to execute whereby you can optimize it or, alternatively, you could let us know what you’re trying to accomplish and we’ll be able to tell you a possible better way to do it…

Here’s an example of the benchmarking, and what not to do in a think hook ( Should Hud Paint is ran every frame numerous times )
https://dl.dropboxusercontent.com/u/26074909/tutoring/benchmarking_tips/benchmarking_hud_stuff.lua