PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: Odin on 25 April, 2004, 00:39:29

Title: userlevel
Post by: Odin on 25 April, 2004, 00:39:29
How can I get this:
if user.bOperator == nil thento comply to not only op's, but vip's and registered users as well?
Title:
Post by: plop on 25 April, 2004, 02:13:37
if user.iProfile ~= -1 then

plop
Title:
Post by: Odin on 25 April, 2004, 10:52:17
tnx plop :) but I'm still confused

if user.bOperator == nil then --return true if userlevel are user, reg or vip?

if user.iProfile ~= -1 then --return true if userlevel is reg, vip, op or master?

Please correct me if I'm wrong
what does the -1 do?



what I need is --return true if userlevel are user and return false if reg, vip, op and master
Title:
Post by: Odin on 25 April, 2004, 13:31:50
Will this do it?

if user.iProfile == 4 then
Title:
Post by: plop on 25 April, 2004, 13:38:24
user.bOperator -- returns nil when the user has no key.

user.iProfile  -- returns the level number from the user.

0 - master
1 - operator
2 - VIP
3 - reg user
-1 - unreg user

this makes.
if user.iProfile ~= -1 then -- return true if the user is everything except a unreg user.

if user.iProfile == 4 then -- this is the 1st non default profile/level you add to ptokax.

plop