Hello guys,
Can you somebody help me with the script: different share sizes for active or passive users (eg. for active users: 1GB and for passive users: 5GB)
Can you help me, please?
Thank you in advance for help!
-- Diff Share 4 Passive
-- Made by Madman
-- Request by Jerry
tConfig = {
["Bot"] = "DiffShare", -- Name on the bot
["PShare"] = 1, -- Share for passive. in GB
["AShare"] = 170, -- share for Active. in GB
}
function NewUserConnected(curUser)
if curUser.iProfile == 2 then
else
if curUser.bActive == nil then -- If passive
if curUser.iShareSize/1024^3 <= tConfig.PShare then -- If bellow min Passive share
curUser:SendData(tConfig.Bot, "You don't have enough share for a Passive user. Minimum us " ..tConfig.PShare.. " GB")
curUser:Disconnect() -- Disconnet
end
else -- If active
if curUser.iShareSize/1024^3 <= tConfig.AShare then -- If bellow min Active share
curUser:SendData(tConfig.Bot, "You don't have enough share for a Active user. Minimum is " ..tConfig.AShare.. " GB")
curUser:Disconnect() -- Disconnect
end
end
end
end
There you go... This should do the trick... =)
*Edit*
Fixa a small bug... ;p
QuoteOriginally posted by madman
There you go...
OK :)
Thank you very much Madman!!!