View Single Post
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 03-29-2009 , 17:20   Re: [TUT] Modules and efficient scripting
Reply With Quote #29

Quote:
Originally Posted by ConnorMcLeod View Post
is_valid_ent only returns 0/1 when pev_valid returns 0,1 or 2.

Code:
/**
 * Checks the validity of an entity.
 *
 * @param entindex        The entity id to check.
 *
 * @return             0 on invalid entity
 *                        1 on entity is valid
 *                        2 on entity is valid and it has private data (safe to use pdata natives on).
 */
native pev_valid(entindex);
Ok. So the comparison is not fair.
A question: is it normal needing the "return 2" case?
__________________
joaquimandrade is offline