View Issue Details

IDProjectCategoryView StatusLast Update
0006861Multi Theft Auto : San AndreasClientpublic2013-04-24 15:16
ReporterarranTunaAssigned Tolil_Toady 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target Version1.4Fixed in Version1.4 
Summary0006861: Teams members aren't sent to clients if set in onResourceStart
Description

a = createTeam("a")

function start()
setPlayerTeam(getRandomPlayer(), a)
end
addEventHandler("onResourceStart", resourceRoot, start)

srun getPlayerTeam(getRandomPlayer())
Command results: userdata: 00000070 [element:team]
crun getPlayerTeam(localPlayer)
Command results: false [boolean]

This works though:

a = createTeam("a")

function start()
setPlayerTeam(getRandomPlayer(), a)
end
addEventHandler("onResourceStart", resourceRoot, function() setTimer(start, 50, 1) end)

Executing client-side command: getPlayerTeam(localPlayer)
Command results: userdata: 00000073 [element:team]

TagsNo tags attached.

Relationships

parent of 0007347 closed Source patches Patch for 0006861: Teams members aren't sent to clients if set in onResourceStart 
has duplicate 0007019 closed New issues Scoreboard not adding players to team 
related to 0007334 closed Multi Theft Auto : San Andreas triggerEvent in onResourceStart does not work 

Activities

kevuwk

2012-02-03 22:21

administrator   ~~0015933

teams are sent, they are just sent after onResourceStart and when subsequently sent to the client, the client isn't informed of any members already associated

LeetWoovie

2012-04-22 04:53

viewer   ~~0016516

Well if I delay sending players to teams by 100ms would it be okay ?

arranTuna

2012-04-23 13:03

manager   ~~0016525

Yes. Using the example is the easiest solution:

addEventHandler("onResourceStart", resourceRoot, function() setTimer(start, 50, 1) end)

As you only need to edit the event handler line by adding the 50ms timer.

CWanted

2013-04-24 09:46

updater   ~~0018395

https://code.google.com/p/mtasa-blue/source/detail?r=5302

Issue History

Date Modified Username Field Change