View Issue Details

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

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)
end
end
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 ...
end

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

TagsNo tags attached.

Activities

[GP_A]XetaQuake

2011-08-27 01:37

viewer   ~~0014490

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

qaisjp

2011-08-27 12:39

administrator   ~~0014496

if Team then
setPlayerTeam ( source, nil )

He already checked that, Xeta

[GP_A]XetaQuake

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.

Picard

2011-08-27 23:08

updater   ~~0014509

Issue automatically marked as fixed by mantisbot ( Fixed in http://code.google.com/p/mtasa-blue/source/detail?r=3091 )

ccw

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:
<minclientversion>1.1.0-9.03094</minclientversion>

Issue History

Date Modified Username Field Change