PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: qaz on 02 July, 2005, 18:34:25

Title: Scipt what couts passives and actives
Post by: qaz on 02 July, 2005, 18:34:25
is there script what counts those users ? or is it possible to make ? didnt find anykind via search... :D


sorry again for bad topic... my english skills sucks..
Title:
Post by: Dessamator on 02 July, 2005, 21:07:45
--Connection mode Counter v0.1
--By Dessamator
function ChatArrival(user,data)
local activeusrs,pasusrs = 0,0
local s,e,cmd = string.find(data,"%b<>%s+(%S+)|")
if cmd == "!viewcon" then
for i,v in frmHub:GetOnlineUsers() do
if v.bActive then
activeusrs = activeusrs + 1
elseif not(v.bActive) then
pasusrs = pasusrs + 1
end
end
user:SendData("bot", "There are "..activeusrs.." active users, and "..pasusrs.." passive users")
return 1
end
end


Done !
Title:
Post by: qaz on 03 July, 2005, 01:53:10
works great, u did it again :)

thanks for thousand times  :))
Title:
Post by: Dessamator on 03 July, 2005, 13:20:03
ur welcome