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.