30.04.2011, 15:57
Hello.
Function SetPlayerTeam sometimes works wrong. Players have this same team, but they may kill each other.
I made code to check what went wrong and I think this may be function bug, not gamemode.
Test-script code: (happens in onplayerdeath)
Some of results:
Time "7:00" in killerid "AddTime" means that, player was added at round start. As You see, killed player was added later.
Function SetPlayerTeam sometimes works wrong. Players have this same team, but they may kill each other.
I made code to check what went wrong and I think this may be function bug, not gamemode.
Test-script code: (happens in onplayerdeath)
Code:
format(str, sizeof(str),"\r\n[PlayerID] SkinID: %d | Team: %d (%d) | AddTime: %d:%02d * [KillerID] SkinID: %d | Team: %d (%d) | AddTime: %d:%02d *** RoundTime: %d:%02d | SpawnProtect: %d", GetPlayerSkin(playerid), GetMainTeam(playerid), GetPlayerTeam(playerid), GetPVarInt(playerid, PV_ADD_MIN), GetPVarInt(playerid, PV_ADD_SEK), GetPlayerSkin(killerid), GetMainTeam(killerid), GetPlayerTeam(killerid), GetPVarInt(killerid, PV_ADD_MIN), GetPVarInt(killerid, PV_ADD_SEK), CzasMin, CzasSek, SpawnProtect <= 0 ? 0 : 1); //GetMainTeam is gamemode function.
Quote:
[PlayerID] SkinID: 114 | Team: 2 (2) | AddTime: 6:45 * [KillerID] SkinID: 114 | Team: 2 (2) | AddTime: 7:00 *** RoundTime: 2:45 | SpawnProtect: 0 [PlayerID] SkinID: 114 | Team: 2 (2) | AddTime: 6:25 * [KillerID] SkinID: 114 | Team: 2 (2) | AddTime: 7:00 *** RoundTime: 3:49 | SpawnProtect: 0 |