Exports
Server
exports.lvs_idmanager:create
exports.lvs_idmanager:createSyntax
exports.lvs_idmanager:create(playerId, typeId, extra)Parameters
playerId (number): The player's server ID.
typeId (string): One of the types defined in
Config.CardType(located inconfig.lua).extra (table | nil): Optional parameter used when
typeIdis'driver'. It should contain the keyclass, indicating the driver's license class.
Return Value
If
typeIddoes not exist inConfig.CardType, the function returnsnil.On success, the function grants the player an item with the following metadata:
type = 'identification' id_number id_type id_cid id_dob id_firstname id_lastname id_sex id_nationality id_photo id_job? -- Only on jobs id's id_occupation? -- Only on jobs id's id_class? -- Only if typeId is 'driver'
Example Usage
Notes
If
typeIdis not defined inConfig.CardType, the function returnsniland does not execute any actions.If
typeIdis'driver', it is recommended to always provide a validextra.class.Best Practice: Before granting the item, it is advisable to check whether the player can carry it to avoid inventory issues.
exports.lvs_idmanager:createFake
exports.lvs_idmanager:createFakeSyntax
Parameters
playerId (number): The player's server ID.
typeId (string): One of the types defined in
Config.CardType(located inconfig.lua).data (table): A table containing the following information:
Return Value
If
typeIddoes not exist inConfig.CardType, the function returnsnil.On success, the function grants the player an item with the same metadata structure as
create.
Example Usage
Notes
If
typeIdis not defined inConfig.CardType, the function returnsniland does not execute any actions.If
typeIdis'driver', it is recommended to always provide a validextra.class.Best Practice: Before granting the item, it is advisable to check whether the player can carry it to avoid inventory issues.
exports.lvs_idmanager:isFake
exports.lvs_idmanager:isFakeSyntax
Parameters
metadata (table): ID Item metadata to check.
Return Value
Returns
trueif the document type is illegal (fake), otherwisefalse.
Example Usage
exports.lvs_idmanager:isOwner
exports.lvs_idmanager:isOwnerSyntax
Parameters
playerId (number): The player's server ID.
metadata (table): The data of the identification item metadata.
Return Value
Returns
trueif the identification belongs to the specifiedplayerId, otherwisefalse.
Example Usage
Last updated