Games
Developers
Forums
More
BYOND
Download
Developer Guide
Developer Reference
Support
Terms of Service
Membership
Contact Us
Many features on this site require JavaScript. Please enable JavaScript support in your browser.
Register
Login
BYOND Forums
Announcements
·
BYOND Help
·
Bug Reports
·
Feature Requests
·
Beta Testers
·
Beta Bugs
·
Developer Help
·
Design Philosophy
·
Demos & Libraries
·
Tutorials & Snippets
·
Art & Sound
·
Classified Ads
·
Game Updates
·
Contests & Events
·
Linux Talk
·
On Topic
·
Off Topic
is src a human?
[Tips]
ID:174282
Sep 3 2003, 11:48 am
Xallius
how do u check if src is a player
if(src.client.key != null) ?
Sep 3 2003, 11:57 am
Theodis
how do u check if src is a player
if(src.client.key != null) ?
A player is anyone that has a client(well unless you can have people join that aren't technically players).
So all you have to do is
if(src.client) //If client is null then src is not a player.
//src is a player
else
//src is an NPC
But depending on the proc src might not be a mob so make sure you know where to use it.
BTW: This should be in Newbie Central.
Sep 3 2003, 1:01 pm
In response to
Theodis
Xallius
i know, and thanks for the help, just wanted to give the mods something to do...
Copyright © 2025 BYOND Software. All rights reserved.
A player is anyone that has a client(well unless you can have people join that aren't technically players).
So all you have to do is
if(src.client) //If client is null then src is not a player.
//src is a player
else
//src is an NPC
But depending on the proc src might not be a mob so make sure you know where to use it.
BTW: This should be in Newbie Central.