addEvent("setText", true) addEventHandler("setText", root, function(element, text) guiSetText ( element, text ) end )
function changeMyTeamName(plr, cmd, opcja, newName) if opcja == "1" then setTeamName ( team1, newName ) triggerClientEvent ( plr, "setText", plr, lteam1, newName ) elseif opcja == "2" then setTeamName ( team2, newName ) triggerClientEvent ( plr, "setText", plr, lteam2, newName ) end end addCommandHandler ( "tsn", changeMyTeamName )