Jump to content

Evil-Cod3r

Members
  • Posts

    370
  • Joined

  • Last visited

Posts posted by Evil-Cod3r

  1. Try This

    myMarker = createMarker( 1478.336, 2647.9533691406, 55.8359375, 'cylinder', 2.0, 0, 0, 255, 150 ) 
      
    function MarkerHit ( hitPlayer, matchingDimension ) 
        if getElementType( hitPlayer ) == "player"  then 
        setElementPosition ( hitPlayer, 287.85568, 1820.85620, 17.64063 ) 
    end 
    end 
    addEventHandler ( "onClientMarkerHit", getRootElement(), myMarker, MarkerHit ) 
    

    Updated !!

  2. Like This ?

    local teams = getElementsByType("team") 
    for i,team in ipairs(teams) do 
       local teamName = getTeamName(teams) 
       function balanceTeams ( thePlayer ) 
        local Count1 = countPlayersInTeam (teamName) 
        local Count2 = countPlayersInTeam (teamName) 
        if (Count1 == Count2) then 
            setPlayerTeam ( thePlayer, teamName ) 
        elseif (Count1 > Count2) then 
            setPlayerTeam ( thePlayer, teamName ) 
        elseif (Count1 < Count2) then 
            setPlayerTeam ( thePlayer, teamName ) 
        end 
    end 
    end 
    

  3. myMarker = createMarker( 1478.336, 2647.9533691406, 55.8359375, 'cylinder', 2.0, 0, 0, 255, 150 ) 
      
    function markerHit ( element, dimension ) 
          setElementPosition ( element, 287.85568, 1820.85620, 17.64063 ) 
    end 
    addEventHandler( "onMarkerHit", myMarker, MarkerHit ) 
    

  4. what if teams keep changeing ?

    function balanceTeams ( thePlayer ) 
        local Team1 = getTeamFromName () 
        local Team2 = getTeamFromName () 
        local Count1 = countPlayersInTeam () 
        local Count2 = countPlayersInTeam () 
        if Count1 == Count2 then 
            setPlayerTeam ( thePlayer , Team1 ) 
        elseif Count1 > Count2 then 
            setPlayerTeam ( thePlayer , Team2 ) 
        elseif Count1 < Count2 then 
            setPlayerTeam ( thePlayer , Team2 ) 
        end 
      
    

  5. Hi all i want to Make script Team ballance if team 1 = 10 players i write /b the teams well be team 1 = 5

    team 2 = 5

    i want the script automauicy get teams Name what ever they are !

    can some one give me the functions and events i need to make this script ?

    :D

×
×
  • Create New...