Ulysses
General => Off-Topic => Topic started by: jay209015 on July 17, 2008, 01:29:00 PM
-
I've been looking all over the garrysmod wiki, but have yet to find any documentation on this. I know it must be out there, because it's getting used a quite a few scripts. So, it would be greatly appreciated if someone could point in the right direction.
-
http://code.garrysmod.com/?show=/garrysmod/gamemodes/sandbox/gamemode/cl_notice.lua#18
It's used for those tips that popup.
-
Thank you, been looking for that for a while.
One more question, how do you make functions like you did with ULib ?
like
ULib.kick(ply, reason )
if I try and create a function with Dev.function( stuff here) it says
attempt to index global 'Dev' (a nil value)
==EDIT==
Looked into ULib's code and figured out that it was table, "Duh:S" .
-
You could use this
function DisplayNotify(msg)
local txt = msg:ReadString()
GAMEMODE:AddNotify(txt, msg:ReadShort(), msg:ReadLong())
-- Log to client console
print(txt)
end
usermessage.Hook("_Notify", DisplayNotify)