Jump to content

[HELP] Race Steak


K4stic

Recommended Posts

Posted

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 

Giving a Fuck? Nope, That isn't in My Skill Set

castie11.png

Posted

I don't understand the problem.

Is it that "position" is not returning 1?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

i think yes they not return 1

i will example: like we are 2 players in server and 1 die they nothing happen.

till line 7 all work

Giving a Fuck? Nope, That isn't in My Skill Set

castie11.png

Posted

And what is "position" returning? what value?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I know what it's meant to return, but I mean what is returning when you test it, if it's not returning 1, then it has to be returning another value.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...