communicate core when setting a new team or deaths
This commit is contained in:
parent
5d5d1e1a7c
commit
0b834a3f9b
|
@ -140,12 +140,8 @@ static cell AMX_NATIVE_CALL cs_set_user_deaths(AMX *amx, cell *params) // cs_set
|
||||||
WRITE_SHORT(*((int *)pPlayer->pvPrivateData + OFFSET_TEAM)); // should these be byte?
|
WRITE_SHORT(*((int *)pPlayer->pvPrivateData + OFFSET_TEAM)); // should these be byte?
|
||||||
MESSAGE_END();
|
MESSAGE_END();
|
||||||
|
|
||||||
if (params[2] == 1)
|
int *deaths = static_cast<int *>(MF_PlayerPropAddr(params[1], Player_Deaths));
|
||||||
MF_SetPlayerTeamInfo(params[1], params[2], "TERRORIST");
|
*deaths = params[2];
|
||||||
else if (params[2] == 2)
|
|
||||||
MF_SetPlayerTeamInfo(params[1], params[2], "CT");
|
|
||||||
else
|
|
||||||
MF_SetPlayerTeamInfo(params[1], params[2], NULL);
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -531,6 +527,13 @@ static cell AMX_NATIVE_CALL cs_set_user_team(AMX *amx, cell *params) // cs_set_u
|
||||||
WRITE_STRING(teaminfo);
|
WRITE_STRING(teaminfo);
|
||||||
MESSAGE_END();
|
MESSAGE_END();
|
||||||
|
|
||||||
|
if (params[2] == 1)
|
||||||
|
MF_SetPlayerTeamInfo(params[1], params[2], "TERRORIST");
|
||||||
|
else if (params[2] == 2)
|
||||||
|
MF_SetPlayerTeamInfo(params[1], params[2], "CT");
|
||||||
|
else
|
||||||
|
MF_SetPlayerTeamInfo(params[1], params[2], NULL);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user