Raised This Month: $ Target: $400
 0% 

get_user_attacker returns wrong id [PARTLY SOLVED]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Lt Llama
Senior Member
Join Date: Aug 2004
Old 10-04-2006 , 12:45   Re: get_user_attacker returns wrong id
Reply With Quote #3

Quote:
Originally Posted by Zenith77 View Post
If you run this on other mods, like HL, that have monsters or other stuff in them, the entity index can be anywhere between the number of max players on a server and 500 (default), causing an out of bounds error.

You can essentially filter the monsters out with a simple check like:

Code:
if (!is_user_alive(id))     // It's a monster!
Im running it in TFC but im using is_user_alive(id) before i check if the player is noclipping. I also tested on myself and as you can see it returns an id number of 298 as Attacker and 1 as Victim. I want it to be 1 and 1.
__________________
A dodo: Used to describe someone without common sense and who always has the pathetic confused look on their face when a question is asked.
Lt Llama 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 04:50.


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