Участник
Пользователь
- Сообщения
- 132
- Реакции
- 35
Would someone be so kind and implement the 'winspread' Feature from https://forums.alliedmods.net/showthread.php?p=444328 into that 'AWPoff'-Plugin?AllMassive, * Hidden text: cannot be quoted. *
if (winspread_awp)
{
if (team == 2)
score_dif = ctscore - tscore
else if (team == 1)
score_dif = tscore - ctscore
if (score_dif >= winspread_awp)
{
client_print(id,print_center,"You are on the winning team and cannot use AWP's (ScDif:%d, WsAWP:%d).", score_dif, winspread_awp)
return PLUGIN_HANDLED
}
}
#tryinclude "reapi.inc"
#if !defined _reapi_included
#include "fakemeta.inc"
#endif
static GetWinsDiff() {
#if defined _reapi_included
return abs(get_game_member(m_iNumTerroristWins) - get_game_member(m_iNumCTWins))
#else
return abs(get_gamerules_int("CHalfLifeMultiplay", "m_iNumTerroristWins") - get_gamerules_int("CHalfLifeMultiplay", "m_iNumCTWins"))
#endif
}
const WIN_DIFF = 20;
stock TeamName:rg_get_team_losers(&diff = 0)
{
diff = get_member_game(m_iNumTerroristWins) - get_member_game(m_iNumCTWins);
return abs(diff) < WIN_DIFF ? TEAM_UNASSIGNED : diff ? TEAM_CT : TEAM_TERRORIST;
}
new var1 = -3
if(var1)
server_print("хобана")
This seems to be the relevant part from the snipermit-plugin from amxmodx.C++:if (winspread_awp) { if (team == 2) score_dif = ctscore - tscore else if (team == 1) score_dif = tscore - ctscore if (score_dif >= winspread_awp) { client_print(id,print_center,"You are on the winning team and cannot use AWP's (ScDif:%d, WsAWP:%d).", score_dif, winspread_awp) return PLUGIN_HANDLED } }
But whats this?Код:#tryinclude "reapi.inc" #if !defined _reapi_included #include "fakemeta.inc" #endif static GetWinsDiff() { #if defined _reapi_included return abs(get_game_member(m_iNumTerroristWins) - get_game_member(m_iNumCTWins)) #else return abs(get_gamerules_int("CHalfLifeMultiplay", "m_iNumTerroristWins") - get_gamerules_int("CHalfLifeMultiplay", "m_iNumCTWins")) #endif }
Thank you.Автор не я.