From f2bfee294e21d1be6364283d1699b4285c7c5d9c Mon Sep 17 00:00:00 2001 From: Lukasz Wlasinksi Date: Wed, 4 Aug 2004 15:32:48 +0000 Subject: [PATCH] fixed get_user_team to work with DoD --- amxmodx/amxmodx.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/amxmodx/amxmodx.cpp b/amxmodx/amxmodx.cpp index 517065b7..6155e07e 100755 --- a/amxmodx/amxmodx.cpp +++ b/amxmodx/amxmodx.cpp @@ -682,8 +682,27 @@ static cell AMX_NATIVE_CALL get_user_team(AMX *amx, cell *params) /* 3 param */ return -1; CPlayer* pPlayer = GET_PLAYER_POINTER_I(index); if (pPlayer->ingame){ + // SidLuke , DoD fix + if ( g_bmod_dod ){ + int iTeam = pPlayer->pEdict->v.team; + if ( params[3] ){ + char *szTeam = ""; + switch(iTeam){ + case 1: + szTeam = "Allies"; + break; + case 2: + szTeam = "Axis"; + break; + } + set_amxstring(amx,params[2],szTeam,params[3]); + } + return iTeam; + } + // if ( params[3] ) - set_amxstring(amx,params[2],pPlayer->team.str(),params[3]); + set_amxstring(amx,params[2],pPlayer->team.str(),params[3]); + return pPlayer->teamId; } return -1;