ULX

Author Topic: GAMEMODE:AddNotify  (Read 3480 times)

0 Members and 1 Guest are viewing this topic.

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
GAMEMODE:AddNotify
« 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.
An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: GAMEMODE:AddNotify
« Reply #1 on: July 17, 2008, 01:41:48 PM »
Experiencing God's grace one day at a time.

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: GAMEMODE:AddNotify
« Reply #2 on: July 17, 2008, 04:18:42 PM »
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
Code: [Select]
attempt to index global 'Dev' (a nil value)
==EDIT==

Looked into ULib's code and figured out that it was table, "Duh:S"  .
« Last Edit: July 17, 2008, 04:45:08 PM by jay209015 »
An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

Offline Sc00by22

  • Jr. Member
  • **
  • Posts: 98
  • Karma: 0
Re: GAMEMODE:AddNotify
« Reply #3 on: July 24, 2008, 03:36:32 PM »
You could use this

Quote
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)