View Issue Details

IDProjectCategoryView StatusLast Update
0006425Multi Theft Auto : San AndreasClientpublic2011-08-30 12:02
Reporter[GP_A]XetaQuake Assigned Toccw  
Status resolvedResolutionfixed 
PlatformPCOSWindowsOS Version7
Target Version1.1.1Fixed in Version1.1.1 
Summary0006425: clientside getPlayersInTeam returns wrong data

look at steps to reproduce.

This is a big issue, because the scoreboards are not working correct anymore when removing an player from an existing team...

this should be fixed as fast as possible, maybe using an auto update bugfix, please.

Steps To Reproduce

###-- SERVERSIDE --###

function removePlayerFromTeam ( source )
local Team = getPlayerTeam ( source )
if Team then
setPlayerTeam ( source, nil )
triggerClientEvent(getRootElement(), "playerTeamLeave", source, Team)
addCommandHandler ( "teambug", removePlayerFromTeam )

###-- CLIENTSIDE --###

function playerTeamLeave(team)
outputChatBox(getPlayerTeam(source)) -- returns false

local players = getPlayersInTeam( team )
for key, player in ipairs( players ) do
    outputChatBox(getPlayerName(player)) -- getPlayersInTeam returns wrong data ...

addEvent("playerTeamLeave", true)
addEventHandler("playerTeamLeave", getRootElement(), playerTeamLeave)

TagsNo tags attached.



2011-08-27 01:37

viewer   ~~0014490

please note you need to be in a team when performing the script.


2011-08-27 12:39

administrator   ~~0014496

if Team then
setPlayerTeam ( source, nil )

He already checked that, Xeta


2011-08-27 13:01

viewer   ~~0014497

Yes i know, just wanted to point that out.

some more background information: Because i use dynamic teams in my gamemode, where players can join and leave as they like, this bug is problematic for me. Not because my script is broken or something, but because scoreboard and dxscoreboard do not display the teams correctly anymore.


2011-08-27 23:08

updater   ~~0014509

Issue automatically marked as fixed by mantisbot ( Fixed in )


2011-08-30 12:02

administrator   ~~0014550

Note that both client and server need to be after this revision.
Set minclientversion in mtaserver.conf to:

Issue History

Date Modified Username Field Change