28.10.2018, 14:19
Does it allow up to 4v4 duels? What if it is a 1v1? The last three indexes will be NONE and access invalid index.
which ... is "Team" and "Enemy".
Resetting the duel variables and then their participants variables separated is better because I believe you call `ResetDuelInfo` function for all participants and if it allows 4v4, then it will reset the teams many times instead of only one.
pawn Код:
for(new i = 0; i < 4; i++)
{
if (DuelInfo[playerid][...][i] != NONE)
{
DuelerID[DuelInfo[playerid][...][i]] = NONE;
DuelInfo[playerid][...][i] = NONE;
DuelInfo[playerid][Status...][i] = 0;
}
}
Resetting the duel variables and then their participants variables separated is better because I believe you call `ResetDuelInfo` function for all participants and if it allows 4v4, then it will reset the teams many times instead of only one.