userlevel
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

userlevel

Started by Odin, 25 April, 2004, 00:39:29

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Odin

How can I get this:
if user.bOperator == nil then
to comply to not only op's, but vip's and registered users as well?
Norges DC hub nummer 1!
dchub://odin.vikingshub.com:1337  

plop

#1
if user.iProfile ~= -1 then

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Odin

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
Norges DC hub nummer 1!
dchub://odin.vikingshub.com:1337  

Odin

Will this do it?

if user.iProfile == 4 then
Norges DC hub nummer 1!
dchub://odin.vikingshub.com:1337  

plop

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
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

SMF spam blocked by CleanTalk