Jump to content

Help with teams


Recommended Posts

addEventHandler( 'onClientGUIClick', buttonJuggernaut, 
        triggerServerEvent('giveJuggernautTeam', localPlayer) 
        local theTeamJuggernaut = getTeamFromName( 'Juggernaut' ) 
        if ( countPlayersInTeam( theTeamJuggernaut ) ) then 
            guiSetVisible( windowTeams, false ) 
            tooMuchJuggernauts = guiCreateLabel( 0.2, 0.3, 0.4, 0.1, "There are to many Juggernauts already", true ) 
            guiSetFont( tooMuchJuggernauts, "sa-header" ) 
    end, false 

addEvent('giveJuggernautTeam', true) 
addEventHandler('giveJuggernautTeam', getRootElement(), 
        setPlayerTeam(source, getTeamFromName('Juggernaut')) 

something i tried to do, but didn't work out, top is client, bottom is server sided scripts, i know they are not one of the working ones, but everything there like gui, buttons exist :)

Link to comment

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...