diff --git a/server/sv_property.lua b/server/sv_property.lua index db39088..60545bf 100644 --- a/server/sv_property.lua +++ b/server/sv_property.lua @@ -476,7 +476,7 @@ RegisterNetEvent("ps-housing:server:showcaseProperty", function(property_id) local jobName = job.name local onDuty = job.onduty - if jobName == "realtor" and onDuty then + if jobName == Config.RealtorJobName and onDuty then local showcase = lib.callback.await('ps-housing:cb:showcase', src) if showcase == "confirm" then property:PlayerEnter(src) @@ -762,7 +762,7 @@ lib.callback.register('ps-housing:cb:getPropertyInfo', function (source, propert local jobName = job.name local onDuty = job.onduty - if not jobName == "realtor" and not onDuty then return end + if not jobName == Config.RealtorJobName and not onDuty then return end local data = {} diff --git a/shared/config.lua b/shared/config.lua index a47e646..35ff963 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -35,6 +35,8 @@ Config.MinGradeToRaid = 3 -- Minimum grade to raid a property Config.RaidTimer = 5-- 5 minutes +Config.RealtorJobName = "realtor" -- Set your Real Estate job here + -- Realtor Commisions based on job grade, the rest goes to the owner, if any. Config.Commissions = { [0] = 0.05, -- 5% commision for each sale diff --git a/shared/framework.lua b/shared/framework.lua index cd3eaba..b170ee5 100644 --- a/shared/framework.lua +++ b/shared/framework.lua @@ -84,7 +84,7 @@ Framework.qb = { local job = PlayerData.job local jobName = job.name local onDuty = job.onduty - return jobName == "realtor" and onDuty + return jobName == Config.RealtorJobName and onDuty end, }, { @@ -96,7 +96,7 @@ Framework.qb = { local job = PlayerData.job local jobName = job.name local onDuty = job.onduty - return jobName == "realtor" and onDuty + return jobName == Config.RealtorJobName and onDuty end, }, { @@ -163,7 +163,7 @@ Framework.qb = { local gradeAllowed = tonumber(job.grade.level) >= Config.MinGradeToRaid local onDuty = job.onduty - return jobName == PoliceJobs[jobName] and gradeAllowed and onDuty + return PoliceJobs[jobName] and gradeAllowed and onDuty end, }, } @@ -285,7 +285,7 @@ Framework.ox = { local job = PlayerData.job local jobName = job.name - return jobName == "realtor" + return jobName == Config.RealtorJobName end, }, { @@ -297,7 +297,7 @@ Framework.ox = { local job = PlayerData.job local jobName = job.name local onDuty = job.onduty - return jobName == "realtor" and onDuty + return jobName == Config.RealtorJobName and onDuty end, }, { @@ -320,7 +320,7 @@ Framework.ox = { local gradeAllowed = tonumber(job.grade.level) >= Config.MinGradeToRaid local onDuty = job.onduty - return jobName == "police" and onDuty and gradeAllowed + return PoliceJobs[jobName] and onDuty and gradeAllowed end, }, }, @@ -361,7 +361,7 @@ Framework.ox = { local gradeAllowed = tonumber(job.grade.level) >= Config.MinGradeToRaid local onDuty = job.onduty - return jobName == "police" and onDuty and gradeAllowed + return PoliceJobs[jobName] and onDuty and gradeAllowed end, }, },