View Single Post
Author Message
databomb
Veteran Member
Join Date: Jun 2009
Location: california
Old 06-17-2009 , 14:04   Hostage Interaction in CSS
Reply With Quote #1

Making a script to allow terrorists to get hostages to follow them..

Relevant code:
For on plugin start:
Code:
g_LeaderOffset = FindSendPropOffs("CHostage", "m_leader");
On an event with a "hostage" ID:
Code:
   new LeaderInfo = GetEntData(Hostage_ID, g_LeaderOffset);
   PrintToServer("Leader information: %i", LeaderInfo);
When the hostage is NOT following anyone, the LeaderInfo will return 0.
When the hostage IS following a CT, the LeaderInfo will return a large int resembling a STEAM ID but the ID is invalid. I'm expecting a userid here and not getting it.

I read something about the GetEntData function having some problems with this type of set up and wondering which function I should be using here.
databomb is offline