--------------------------------------------------------------------------------------- -- Sent to the racing control object when a player's rank in the race has changed. --------------------------------------------------------------------------------------- function onRacingPlayerRankChanged(self, msg) local playerName = msg.playerID:GetName().name local player = msg.playerID local oldRank = msg.oldRank local newRank = msg.newRank if self:GetVar("RaceStarted") then --print("onRacingPlayerRankChanged "..oldRank.." "..playerName) UI:SendMessage("RaceStat", {{"racePos_"..oldRank, playerName }} ) end end --------------------------------------------------------------------------------------- -- Sent to the racing control object when a player's 'wrong-way' status changes. --------------------------------------------------------------------------------------- function onRacingPlayerWrongWayStatusChanged(self, msg) local player = msg.playerID local way = msg.bGoingWrongWay if (way) then UI:SendMessage("RaceWW", {{"UI","show" }} ) else UI:SendMessage("RaceWW", {{"UI","hide" }} ) end end