Raised This Month: $ Target: $400
 0% 

Status of a hostage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Wolle
Member
Join Date: Jun 2005
Location: Berlin / Germany
Old 12-22-2005 , 11:35   Status of a hostage
Reply With Quote #1

Small question.
Is it possible to ask of a hostage's status?
Like...

hostage_status = get_hostage_status(hostage_id)
if( hostage_status == dead )
forget about it

and so on..
??
Wolle is offline
Send a message via AIM to Wolle
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 12-22-2005 , 13:48  
Reply With Quote #2

You could try checking its health.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Wolle
Member
Join Date: Jun 2005
Location: Berlin / Germany
Old 12-22-2005 , 14:32  
Reply With Quote #3

How would I do that?
Wolle is offline
Send a message via AIM to Wolle
VEN
Veteran Member
Join Date: Jan 2005
Old 12-22-2005 , 15:07  
Reply With Quote #4

<EDIT>
Code:
new Float:floatHealth =  entity_get_float(hostageID, EV_FL_health)
VEN is offline
Wolle
Member
Join Date: Jun 2005
Location: Berlin / Germany
Old 12-22-2005 , 15:23  
Reply With Quote #5

Ahh, now I see how to approach the problem.

Ok next question.
Looking for func_rescue_zone and func_buyzone in CS 1.6 doesn't always work.
I need to get the distance between the hostage entity and a rescue or buyzone.
So far I'm able to get the distance between hostages and a certain player.
Any clue on why the rescue zone can be found on cs_office but not on upc? Ok maybe the "mapper" didn't put that zone in but he/she certainly put the buyzone in. But the buyzone can't be found either.

This is how I loop through all entities.
Code:
for( i = 0; i <= entity_count(); i++ )     {         if( is_valid_ent( i ))         {             new ClassName[33]             entity_get_string(i, EV_SZ_classname,ClassName, 32)                         if(equali(ClassName, "hostage_entity"))             { . . . . and so on
Wolle is offline
Send a message via AIM to Wolle
VEN
Veteran Member
Join Date: Jan 2005
Old 12-22-2005 , 23:24  
Reply With Quote #6

This way is better
Code:
new ent  while ((ent = find_ent_by_class(ent, classname))) {      // ...  }
VEN is offline
Wolle
Member
Join Date: Jun 2005
Location: Berlin / Germany
Old 12-23-2005 , 07:30  
Reply With Quote #7

Thanks VEN, I'll give it a shot.
Also, looking at the upc *.map file, the "mapper" obviously didn't put neither buyzone nor rescue zone in.
Sorry for the confusion.
Wolle is offline
Send a message via AIM to Wolle
Reply



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 15:46.


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