Hooks/Server/agendaUpdated

From DarkRP
Hook
Hook name agendaUpdated(Player ply, table agenda, string text)
Description:
When the agenda is updated.
Returns: string text
Realm:
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=Hooks/Server/agendaUpdated]agendaUpdated hook[/url][/b]

Parameters[edit]

  1. ply (Player)
  2. The player who changed the agenda. Warning: can be nil!

  3. agenda (table)
  4. Agenda table (also holds the previous text).

  5. text (string)
  6. The text the player wants to set the agenda to.

Return values[edit]

  1. text (string)
  2. An override for the text.

Example Code[edit]

___________________________________________________________________________________________

hook.Add("agendaUpdated", "updateagenda", function(ply, agenda, text)
    print(ply.. " " .. "updated the agenda!")
end)

___________________________________________________________________________________________

Result: Quang updated the agenda!