AddAgenda(Title of the agenda, Manager (who edits it), Listeners (the ones who just see and follow the agenda))

+

DarkRP.createAgenda(Title of the agenda, Manager (who edits it), Listeners (the ones who just see and follow the agenda))

}}

}}

==Here's an example:==

==Here's an example:==

{{Code|1=

{{Code|1=

−

AddAgenda("Gangster's agenda", TEAM_MOB, {TEAM_GANG})

+

DarkRP.createAgenda("Gangster's agenda", TEAM_MOB, {TEAM_GANG})

}}

}}

This will create an agenda that TEAM_MOB can set, with /agenda, and TEAM_GANG can see, the agenda will be titled 'Gangster's agenda'.

This will create an agenda that TEAM_MOB can set, with /agenda, and TEAM_GANG can see, the agenda will be titled 'Gangster's agenda'.

You can allow more than 1 job to see it by separating them with commas, eg: {TEAM_GANG, TEAM_HOBO}.

You can allow more than 1 job to see it by separating them with commas, eg: {TEAM_GANG, TEAM_HOBO}.

+

+

==Multiple manager jobs==

+

Since DarkRP 2.6.0 you can have multiple manager job for a single agenda. You'll have to be careful, though: you will have to put them in curly braces, or it will give an error.

+

+

Here's another example. In this example, the Mayor and the Chief are managers of the agenda. The only other job that can see it is police. Note the curly braces around chief, mayor and around the police.

Revision as of 18:10, 22 February 2015

Contents

You can create your own agenda, like the mobboss/gangster agenda, for your own classes as of this revision.

You do this in lua/darkrp_customthings/jobs.lua (see here), at the bottom of the file, underneath the default agendas.

Here's how you create your own:

DarkRP.createAgenda(Title of the agenda, Manager (who edits it), Listeners (the ones who just see and follow the agenda))

Here's an example:

DarkRP.createAgenda("Gangster's agenda", TEAM_MOB, {TEAM_GANG})

This will create an agenda that TEAM_MOB can set, with /agenda, and TEAM_GANG can see, the agenda will be titled 'Gangster's agenda'.
You can allow more than 1 job to see it by separating them with commas, eg: {TEAM_GANG, TEAM_HOBO}.

Multiple manager jobs

Since DarkRP 2.6.0 you can have multiple manager job for a single agenda. You'll have to be careful, though: you will have to put them in curly braces, or it will give an error.

Here's another example. In this example, the Mayor and the Chief are managers of the agenda. The only other job that can see it is police. Note the curly braces around chief, mayor and around the police.