Files
Leviathan/GameServer/AziaMafiaScriptsBackup/Funzone/require/Point give Fixer.lua
T
2026-06-01 12:46:52 +02:00

81 lines
1.8 KiB
Lua

function add_currency(name, nbr , use_type )
-- use_type = 1 item / 0 = cmd
max_point = 2000000000
use_type = use_type or 0
if name == "ap" then point = "ap" end
if name == "bp" then point = "huntaholic_point" end
if name == "fz" then point = "fz_point" end
if name == "afk" then point = "afk_point" end
if name == "gp" then point = "gp_point" end
if name == "sp" then point = "sp_point" end
add_point = gv(point) + nbr
check = math.min( math.max(add_point , 0 ) , max_point )
if check <= max_point and use_type == 1 then
sv(point , add_point )
cprint(sconv("<#FE2E64><b>Add $ % Points ","$", format_num(nbr,0) ,"%", name))
return 1
end
if check > max_point and use_type == 1 then
cprint("<#FE2E64><b>Error : Can't add % points Overflow" ,"%", name)
return 1
end
if check <= max_point and use_type == 0 then
sv(point , add_point )
cprint(sconv("<#FE2E64><b>Add $ % Points ","$", format_num(nbr,0) ,"%", name))
return 3
end
if check > max_point and use_type == 0 then
sv(point , max_point )
cprint(sconv("<#FE2E64><b>Max % Points","%", name))
return 4
end
end
function add_currency_nolog(name, nbr , use_type )
-- use_type = 1 item / 0 = cmd
max_point = 2000000000
use_type = use_type or 0
if name == "ap" then point = "ap" end
if name == "bp" then point = "huntaholic_point" end
if name == "fz" then point = "fz_point" end
if name == "afk" then point = "afk_point" end
if name == "gp" then point = "gp_point" end
if name == "sp" then point = "sp_point" end
add_point = gv(point) + nbr
check = math.min( math.max(add_point , 0 ) , max_point )
if check <= max_point and use_type == 1 then
sv(point , add_point )
return 1
end
if check > max_point and use_type == 1 then
return 1
end
if check <= max_point and use_type == 0 then
sv(point , add_point )
return 3
end
if check > max_point and use_type == 0 then
sv(point , max_point )
return 4
end
end