Hello MTAsa Community i have an problem with this script i don't know how to solve it the porblem is that they not pass the line 7
local WonSteak = {}
function getWonSteakonMapComplete( )
local totalPlayers = getPlayerCount ( )
if ( totalPlayers >= 1 ) then
local position = getAliveRacePlayersSteak()
if ( position == 1 ) then
------------------------------------------------
-- BlaBLa the other part of Code blabla --
------------------------------------------------
end
end
end
addEventHandler ( "onPlayerWasted", root, getWonSteakonMapComplete )
function getAliveRacePlayersSteak()
local alivePlayers = 0
for index, player in ipairs(getElementsByType("player")) do
if getElementData( player, "state" ) == "alive" then
alivePlayers = alivePlayers + 1
end
end
return alivePlayers
end