detect NPC user

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

shlomi
Posts: 83
Joined: 21 Feb 2010, 10:38
Location: Israel

detect NPC user

Postby shlomi » 18 Nov 2010, 09:39

hi,

i'm using the 1.x version.

do someone know how i can't detect if user in some room is a NPC user or regular user?
function like isNPC() doesn't exists in the User class or any where else..

thanks..
"A clever person solves a problem, A wise person avoids it."

-- Einstein
TiagoR
Posts: 83
Joined: 15 Mar 2010, 11:42
Location: Portugal
Contact:

Postby TiagoR » 18 Nov 2010, 10:14

Hi,
you can add a user variable to your NPCs on creation, identifying if it is a server NPC or a client NPC. And then when needed you check that variable.
TR
shlomi
Posts: 83
Joined: 21 Feb 2010, 10:38
Location: Israel

Postby shlomi » 18 Nov 2010, 10:24

this is what i tough in the beginning.. i just wanted to figure out if there is something built in SFS to check that..

thanks anyway dude..
"A clever person solves a problem, A wise person avoids it."



-- Einstein

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 27 guests