Functions/DarkRP/Shared/getJobByCommand

From Official DarkRP Wiki
Revision as of 14:25, 31 October 2015 by DarkRPBot (talk | contribs) (Wikibot updated DarkRP documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Function
Function name DarkRP.getJobByCommand(string command)
Description:
Get the job table and number from the command of the job.
Returns: table tbl, number jobindex
Part of Library: DarkRP
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=Functions/DarkRP/Shared/getJobByCommand]DarkRP.getJobByCommand[/url][/b]

Function parameters

  1. command (string)
  2. The command of the job, without preceding slash (e.g. 'medic' for medic)


Function return values

  1. tbl (table)
  2. A table containing all information about the job.

  3. jobindex (number)
  4. The index of the job (for 'medic' it's the value of TEAM_MEDIC).