I thought I had this all figured out.
But while the command works, anyone can run the command.
My profiles go down. Meaning owner=0, admin =1, op = 2, scanner = 3, vip = 4, reg = 5.
Can someone show me what I'm doing wrong?
-----Begin Code
if(cmd==prefix.."mass") then -- Mass Message all online users
if user.iProfile < 5 and user.iProfile ~= nil then
arg=GetArgML(data)
if arg~= nil then
SendPmToAll(botName, user.sName.." sent you the messag : "..arg..".|")
user:SendData(botName,"Mass Message sent.|")
else
user:SendData(botName,"usage is !mass . |")
end
else
user:SendData(botName,"You know you don't have access to this command! |")
SendPmToOps(botName, user.sName.."thinks they're funny and tried to run the "..cmd.."command." )
end
return 1
end
Thank you in advance.
Kyoya
your forgetting that unregistered users have the profile number -1.
try changing this:
if user.iProfile < 5 and user.iProfile ~= nil then
for
if user.iProfile < 5 and user.iProfile > -1 then
plop
if user.iProfile is equal to then
...
Etc: you only want Admin to use it
if user.iProfile == 0 then
if (cmd==Pre.."mass") then
...
end
*smacks head*
Yeah that was it. so much for having it figured out. Thanks!
I decided to redo my profiles to make it simplier on me.
Kyoya