Hello, I'm new to Garry's Mod (bought it couple of days ago)
Wrote up a simple script for testing;
Code:
local function Meatgrinder()
print('hi');
draw.SimpleTextOutlined("Hello World", "Default", 20, 20, Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(0, 0, 0));
end
hook.Remove("HUDPaint", "Meatgrinder");
hook.Add("HUDPaint", "Meatgrinder", Meatgrinder);
I load it ingame in the console with
lua_openscript however, after that nothing happens.
"hi" does not print to console, "Hello World" does not print on screen.
What am I doing wrong?
Thanks for help
If I hook "Think" it gets called, but LocalPlayer() gives me error "attempt to call global 'LocalPlayer' (a nil value)" is this because I'm playing on a local server?