View Single Post
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 04-18-2021 , 22:55   Re: HL Player Models API 1.2 [Last Update: 02/07/2020]]
Reply With Quote #3

hl_get_player_team() is unable to get the team index of the player. Returns 0 with a malformed string.

Tested with bugfixed HL 0.2.51 (59a2950), the latest version of ReHLDS.

Tested with both Orpheu (my own signatures) and ReAPI.

Code:
new teambuf[32]; new teamid = hl_get_player_team(id, teambuf, charsmax(teambuf)); server_print("TEAMID %d - %s", teamid, teambuf);

Code:
TEAMID 0 - k Mesa
Code:
"mp_teamlist" is "Black Mesa;HECU"


EDIT: Managed to solve it by editing the offsets-cbaseplayer.txt file. I just shifted the offsets by 4.
Code:
"m_szTeamName"  // char[16]
{
	"type"      "string"
	"size"      "16"

	"windows"   "1532"
	"linux"     "1552"
	"mac"       "1552"
}
__________________

Last edited by gabuch2; 04-21-2021 at 00:00.
gabuch2 is offline