Bunnyhop? (Check what's wrong with the code?)

(I meant halo… but i accidentally typed in bunnyhop and cannot change it.) If a mod can please change it, thanks!

I looked for the “small problems” thread but i cannot find it so…

[lua] function GlowPlayer()

		for _, plays in pairs( player.GetAll()) do
		effects.halo.Add( {plays}, Color( 255, 0, 0 ), 5, 5, 2 )

hook.Add(“PreDrawHalos”, “GlowPlayerHook”, GlowPlayer)[/lua]

Any idea why this does not work? I’m trying to make it so everyone glows and it just refuses to work.

you don’t need the effects


effects.halo.Add - effects

oh shit.


for _, plays in pairs(player.GetAll()) do
halo.Add( {plays}, Color( 255, 0, 0 ), 5, 5, 2 )

change to


halos are faster when they operate in one sweep, instead of running separately per entity for an unfiltered list like every player

if you wanted to do it only for admins, you still shouldn’t call halo.Add multiple times, unless you want them to have different colors

local t = {}
for k, v in pairs(player.GetAll()) do
if v:IsAdmin() then

be warned that halos are really slow usage of stencils, and lag with several calls to halo.add in a short timeframe (such as for ten separate colors, or ten separate calls to halo.Add of one color)

this example script will accomplish a similar effect using manual stencils, but be warned that it relies on a shared function garry hasn’t made work properly clientside when used on players, so the following example will only be useful on non-player entities

[editline]29th March 2013[/editline]

and here’s a tutorial on stencils

[editline]29th March 2013[/editline]

the tutorial example draws 3D2D text onto a 1x1 phoenix square plate, that uses stencils in order to make the text only show up on the surface of the sign entity, clipping off at the edge, despite however many characters are being drawn in 3D2D