Jump to content
Fivem-DEV.cz

Question

5 answers to this question

Recommended Posts

  • 0
52 minutes ago, Ventraks said:

Jakože každému hráčovi ve frakci by šlo 10% z faktury?

Podľa mňa to myslel tak že len tomu kto dal tu faktúru.

Share this post


Link to post
Share on other sites
  • 0

Pokud chceš dát tomu hráčovi co fakturaci vydal tak ten kod by mohl vypadat nějak takto:

local onePercent = amount / 100
local userAmount = onePercent*tonumber(Config.PercentForSender[xTarget.job.name])
if userAmount < 0 or userAmount > amount then
   dbg.critical('User amount is not valid! Percent for sender has wrong settings! %s', xTarget.job.name)
   return
end

xTarget.addAccountMoney('bank', userAmount)


Vytáhnuté z rcore_billing kde tyto features jsou 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Our partners

rcore.cz
K4mb1
SLTH
×
×
  • Create New...