Raised This Month: $ Target: $400
 0% 

Getting the entity index of a player


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
wgooch
Member
Join Date: Dec 2008
Old 05-04-2009 , 19:49   Re: Getting the entity index of a player
Reply With Quote #6

I'm looking for the entity index of the player, for example, if I enter find_ent weapon_ into the console, I will get something like this
Code:
   'weapon_molotov_spawn' : '' (entindex 28) 
   'weapon_rifle_spawn' : '' (entindex 73) 
   'weapon_pipe_bomb_spawn' : '' (entindex 29) 
   'weapon_first_aid_kit_spawn' : '' (entindex 74) 
   'weapon_hunting_rifle_spawn' : '' (entindex 52) 
   'weapon_first_aid_kit_spawn' : '' (entindex 75) 
   'weapon_ammo_spawn' : '' (entindex 53)
If I type find_ent player I get something like this
Code:
   'player' : '' (entindex 1) 
   'player' : '' (entindex 2) 
   'player' : '' (entindex 3) 
   'player' : '' (entindex 4)
Those indexes seem to have no relation to their ID's so I'm stumped on how to get them, and I don't see how ProcessTargetString is going to help me get them. It allows me to target a player for finding the index, but what I need is a way to figure out a way to retrieve the index first. Please correct me I missed something with ProcessTargetString that would help me with this. I'm very new to SourceMod and still learning a lot about it!
wgooch is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode