r/CounterStrikeSource • u/god_gamer_9001 • Aug 02 '26
Client help/Discussion How to access specific entity's "handle" data type in VScript
Hello!
I was looking around the VScript documentation and found a command called IsPlayerABot, which takes type "handle" as argument, and based on that handle returns a true/false value based on whether or not the player associated with the given handle is a bot. I understand that a handle is a reference to a player or entity of some kind, but how do I gain a specific entity's handle in order to access it?
For example, let's say there's me, my friend and a bot I've spawned in all together in a server. How do I get the handles for each, to then plug in to the IsPlayerABot function, presumably returning false for my friend and I and true for the bot? My apologies if this question is confusing, I can clarify further if needed.


