Dependency
https://github.com/mkafrin/PolyZone/releases you need this its dependency
Installation
Please import uniqers-marriage-database.sql your database.
after open your server server.cfg or what u use cfg.
add this code
FOR QBCORE/QBUS
ensure qb-target
ensure uniqers-marriage
or
start qb-target
start uniqers-marriage
FOR ESX
ensure ox_lib
ensure ox_target
ensure uniqers-marriage
or
start ox_lib
start ox_target
start uniqers-marriage
save and close.
and open uniqers-marriage config.lua at script select your framework and notify and mysql service and save close.
after if use qbcore add items
this to qbcore/shared/items.lua
FOR OLD QBCORE / QBUS
Copy ['weddingring'] = {['name'] = 'weddingring', ['label'] = 'Wedding Ring', ['weight'] = 0, ['type'] = 'item', ['image'] = 'weddingring.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = 'Wedding Ring :)'},
['weddingcertificate'] = {['name'] = 'weddingcertificate', ['label'] = 'Wedding Certificate', ['weight'] = 0, ['type'] = 'item', ['image'] = 'weddingcertificate.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = false, ['combinable'] = nil, ['description'] = 'Wedding Certificate :)'},
FOR NEW QBCORE
Copy weddingring = { name = 'weddingring', label = 'Wedding Ring', weight = 0, type = 'item', image = 'weddingring.png', unique = true, useable = true, shouldClose = false, description = 'Wedding Ring :)'},
weddingcertificate = { name = 'weddingcertificate', label = 'Wedding Certificate', weight = 0, type = 'item', image = 'weddingcertificate.png', unique = true, useable = true, shouldClose = false, description = 'Wedding Certificate :)'},
FOR ESX
this
Copy INSERT INTO items (name, label, limit) VALUES ('weddingcertificate', 'Wedding Certificate', 1), ('weddingring', 'Wedding Ring', 1) ;
or
this
Copy INSERT INTO items (name, label, weight, rare, can_remove) VALUES ('weddingcertificate', 'Wedding Certificate', 1, 0, 1), ('weddingring', 'Wedding Ring', 10, 0, 1) ;
then
if u use OLD qbcore you need this, if u use new qbcore you dont need this. also its for "qb-inventory old" too. if u use other inventory like ox-inventory you dont need this.
open js
add this code
Copy } else if (itemData.name == "weddingcertificate") {
$(".item-info-title").html('
'+itemData.label+'
')
$(".item-info-description").html('
Weight: ' + ((itemData.weight * itemData.amount) / 1000).toFixed(1) + 'kg
Family: ' + itemData.info.family + '
Married Date: ' + itemData.info.date + '
');
} else if (itemData.name == "weddingring") {
$(".item-info-title").html('
'+itemData.label+'
')
$(".item-info-description").html('
Weight: ' + ((itemData.weight * itemData.amount) / 1000).toFixed(1) + 'kg
Family: ' + itemData.info.family + '
Engaged Date: ' + itemData.info.date + '
');
if u use ox_inventory add this code
first open \ox_inventory\data items.lua
Copy ["weddingring"] = {
label = "weddingring",
weight = 10,
stack = true,
close = true,
},
Copy ["weddingcertificate"] = {
label = "weddingcertificate",
weight = 10,
stack = true,
close = true,
},
save and close.
and
open your inventory and add image items
and if u are use qbcore and qbox
Add this cods before qb-core/server/player.lua before function self.Functions.SetPlayerData(key, val)function
Copy function self.Functions.SetNameFull(firstname, lastname)
self.PlayerData.charinfo.firstname = firstname
self.PlayerData.charinfo.lastname = lastname
self.Functions.UpdatePlayerData()
end
function self.Functions.SetNameFirst(firstname)
self.PlayerData.charinfo.firstname = firstname
self.Functions.UpdatePlayerData()
end
function self.Functions.SetNameLast(lastname)
self.PlayerData.charinfo.lastname = lastname
self.Functions.UpdatePlayerData()
end
and save!
if u are use esx you dont need add anything.
and
and start your server and login your character then use script!!
done anjoy!
For the CK trigger event.
Copy TriggerEvent('uniqers-marriage:CharacterDeleted', citizenid)
Support & Updates & Questions