SetPlayerTeam bug
#1

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)
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.
Some of results:
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

Time "7:00" in killerid "AddTime" means that, player was added at round start. As You see, killed player was added later.
Reply


Messages In This Thread
SetPlayerTeam bug - by AxL - 30.04.2011, 15:57
Re: SetPlayerTeam bug - by sabretur - 30.04.2011, 16:27
Re: SetPlayerTeam bug - by rbN. - 02.05.2011, 13:12
Re: SetPlayerTeam bug - by AxL - 02.05.2011, 13:25

Forum Jump:


Users browsing this thread: 1 Guest(s)