diff options
author | rubenwardy <rubenwardy@gmail.com> | 2016-07-29 17:13:01 +0100 |
---|---|---|
committer | rubenwardy <rubenwardy@gmail.com> | 2016-07-29 17:13:01 +0100 |
commit | dee1880fd3e123225491f8e2725fab2cb4b01738 (patch) | |
tree | cb9cbe7a5642ffb0635379990caad84e1ddba69a /readme.md | |
parent | e92be32ec16c26573b4b3a37d9d6f40d95f81998 (diff) |
Add awards.run_trigger_callbacks() and use it
Diffstat (limited to 'readme.md')
-rw-r--r-- | readme.md | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -28,6 +28,14 @@ old fork in Carbone, under same license. * return true to cancel register_on_unlock callbacks and HUD * awards.register_trigger(name, func(awardname, def)) * Note: awards.on[name] is automatically created for triggers +* awards.run_trigger_callbacks(player, data, trigger, table_func(entry)) + * Goes through and checks all triggers registered to a trigger type, + unlocking the award if conditions are met. + * data is the player's award data, ie: awards.players[player_name] + * trigger is the name of the trigger type. Ie: awards.on[trigger] + * table_func is called if the trigger is a table - simply return an + award name to unlock it + * See triggers.lua for examples * awards.register_on_unlock(func(name, def)) * name is the player name * def is the award def. |